Author |
Message |
03/03/2023 07:22:12
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi,
how can I give an Enter-hotkey to a formattedfield in a gridheader-cell?
Background: I use a gridheader row as a column-wise filter. The user should enter a search pattern and press enter instead of tab to next field (flush).
Kind regards,
Joachim
|
|
|
03/03/2023 07:24:34
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
I found it: tabonenter
But it leaves the field, as "tab"onenter mentions.
Is it possible without leaving the focus? Or is there a parameter that indicates the last pressd key?
|
|
|
03/03/2023 07:29:13
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
...yes, TABONENTER this is one possibility (because then the flush is executed...).
Another one would have been to use the normal hot-key-management. Assign a POPUPMENU in which one of the menu items has "Enter" as hot key. This possibility would be the one to choose if you did ask for a different hotkey than "Enter" to trigger the server roundtrip.
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
03/03/2023 07:42:51
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
are You sure that a popup menuitem works, when the focus is in a field?
Kind regards,
Joachim
|
|
|
03/03/2023 08:38:48
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
...it ONLY works if the focus is in the field ;-)
Code:
...
FIELD POPUPMENU="XXXXX"... ACTIONLISTENER="..."
...
POPUPMENU ID="XXXXX"
MENUITEM COMMAND="enter" HOTKEY="10"
So here the focus is required in the FIELD. The ACTIONLISTENER of the FIELD is called with Event BaseActionEventPopupMenuItem, in which the name of the command ("enter") is passed.
Kind regards! - Björn
PS: hope this does not confuse, because your tabonenter-way is correct, too!
|
Björn Müller, CaptainCasa GmbH |
|
|
03/03/2023 09:10:15
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Thank You!
Yes it works. I forgot to set the attribute popupmenu="VALIDATEPOPUP". Only setting hotkey in a menuitem isn't sufficient.
|
|
|
|