[Gambas-user] WebTextArea vs. TextArea controlling events
bsteers4 at gmail.com
Fri Sep 30 22:48:54 CEST 2022
On Thu, 29 Sept 2022 at 15:45, Bruce Steers <bsteers4 at gmail.com> wrote:
> On Thu, 29 Sept 2022 at 15:10, Benoit Minisini <
> benoit.minisini at gambas-basic.org> wrote:
>> Le 29/09/2022 à 15:48, Rolf-Werner Eilert a écrit :
>> > I see your point, Benoit. This is a very special case indeed. Maybe
>> > Bruce Steers' idea of adding java code on demand would be a way?
>> > I wanted to keep the user from clicking somewhere and adding text (and
>> > from going somewhere with the cursor keys and writing or deleting any
>> > text anywhere). The only thing allowed is to add text at the end of the
>> > line.
>> > This is for a program to train 10 fingers' typewriting.
>> > Regards
>> > Rolf
>> Maybe you should not use a WebTextBox then? With a WebDrawingArea, you
>> can now (in the development version) catch key press events and draw
>> what you want, so that you can reimplement a minimal edit field that
>> exactly fits your needs.
> did you add text features yet?
> WebDrawingarea still lacks Paint.Font and Paint.Text() / Paint.RichText()
> I tried to implement it but i think my coding is not good enough
I re-submitted a merge that uses a css font string to set Paint.Font (we
probably need a proper WebFont.class though)
Paint.FillText(Text, X, Y, MaxWidth) and
Paint.StrokeText(Text, X, Y, MaxWidth)
Works with all Paint.Brush types
(StrokeText and gradient brush looks bad, FillText and gradient looks okay)
I doubt it's ultimately how you would do it Ben but it's gotta be partly
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User