[Gambas-user] WebTextArea vs. TextArea controlling events

Bruce Steers 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()
> ability
> I tried to implement it but i think my coding is not good enough
> Respects
> BruceS
>

I re-submitted a merge that uses a css font string to set Paint.Font (we
probably need a proper WebFont.class though)
It has
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
right :)
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220930/8e66310e/attachment.htm>


More information about the User mailing list