[Gambas-user] Problema with stop event on gb.web.gui
benoit.minisini at gambas-basic.org
Fri Sep 15 15:48:29 CEST 2023
Le 14/09/2023 à 16:39, Marco Ancillotti a écrit :
> Hi all,
> I have a problem using stop event on keypress inside a webtextbox on
> If I made a simple:
> Public Sub WebTextBox1_KeyPress()
> If InStr("0123456789", Key.Text) = 0 Then
> Stop Event
> The webtextbox continue to receive all value , also number.
> Is this a bug or working with gb.web.gui pretend a different approach to
> made a textbox accept only some values ?
> Thanks in advance,
You can't cancel keypress events in 'gb.web.gui', as they occur inside
The browser is not allowed (not by me!) to send the event to the server
and waits for its answer to know if it should cancel the event or not.
'Stop Event' just prevents the trigerring of shortcuts associated with
the pressed key.
More information about the User