[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TextBox does not trigger KeyPress event with gtk3
[Thread Prev] | [Thread Next]
- Subject: Re: TextBox does not trigger KeyPress event with gtk3
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Sun, 26 May 2024 15:02:15 +0100
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
On Sun, 26 May 2024 at 14:21, Bruce Steers <bsteers4@xxxxxxxxx> wrote: > The following code... > > Public Sub TextBox1_KeyPress() > > Debug Key.Text > If Key.Text Not Like "[0-9]" Then Stop Event > > End > > With qt5 if i press text keys the key is printed in the debugger and the > textbox inputs nothing, > and if i press numerical keys they are printed and entered into textbox, > as expected. > > gtk3 on the other hand does not fire the TextBox_Keypress event at all. > all keys are entered into the textbox and the debugger prints nothing. > > So the statement on the wiki,, > https://gambaswiki.org/wiki/comp/gb.qt4/control/.keypress > Event Cancellation If you stop the event with STOP EVENT > <https://gambaswiki.org/edit/lang/stopevent>, the control won't see the > keyboard event at all. > > Is only actually true for qt not gtk3 > > Respects > BruceS > I just looked at MaskBox.class source in gb.form and it too uses TextBox_KeyPress event to do a lot of processing so it's also broken. Even the FTestMaskBox.class tester program in gb.form does not work with gtk3, only qt Respects BruceS
| TextBox does not trigger KeyPress event with gtk3 | Bruce Steers <bsteers4@xxxxxxxxx> |