Restored from previous forum. Originally posted by horst.
The KeyboardShortcut works nicely, but is there any way
to find out which gadget currently has the focus???
EventGadgetID() gives me the same value as EventMenuID()
Horst.
(Implemented as 'GetActiveGadget()')
[Implemented] KeyboardShortcut
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by horst.
I have tested it. Does this have any effect other than
informing the user about the default button?
I have a TreeGadget, a StringGadget and two ButtonGadgets,
for example, and when the Enter key is pressed, I have to
take different action depending on the gadget that has the
focus.
That means I have to check each gadget whether it has the
focus, and then do the appropriate action.
It would be much esier, if Enter would just supply the
EventGadgetID(), and EventType() could tell me that it was
the Enter key.
How about that?
Horst.
I have tested it. Does this have any effect other than
informing the user about the default button?
I have a TreeGadget, a StringGadget and two ButtonGadgets,
for example, and when the Enter key is pressed, I have to
take different action depending on the gadget that has the
focus.
That means I have to check each gadget whether it has the
focus, and then do the appropriate action.
It would be much esier, if Enter would just supply the
EventGadgetID(), and EventType() could tell me that it was
the Enter key.
How about that?
Horst.