[Gambas-user] WebTextArea vs. TextArea controlling events

Rolf-Werner Eilert rwe-sse at osnanet.de
Thu Sep 29 12:43:49 CEST 2022

Good morning everyone!

Today I played a bit with WebTextArea and tried to implement some of the 
events controlling key, mouse etc. compared to TextArea. I have 3.17.2 
on this system.

Long time ago I wrote a little program controlling the keystrokes of 
TextArea_KeyPress. This reads somewhat like this:

   If key.Control Then     'Strg+Taste übergehen:
     Stop Event

   Else                    'einfache Tasten alle übergehen:
     Select Case key.Code
     Case key.BackSpace, key.BackTab, key.Delete
       Stop Event
     Case key.Down, key.Up, key.Left, key.Right
       Stop Event
     Case key.Home, key.End, key.PageDown, key.PageUp
       Stop Event
     End Select

   End If

I had also implemented my own linewrap to limit input to 70 characters a 
line. All this runs pretty well there.

Now I wanted to know if there is a chance to implement this to a WebApp. 
So I used WebTextArea and inserted the code above (and somewhat more) 
from the old project to WebTextArea_KeyPress. But WebTextArea doesn't 
seem to catch the keystrokes or at least the code doesn't have any 
effect. Is there a chance to have it run like this?

Furthermore, I found that TextArea_MouseDown and _MouseUp don't exist. 
These would be nice to have. Is there a technical reason they do not 
exist, or have they just not been implemented yet?

Thanks for all insight!


More information about the User mailing list