Re: focus problem
- Posted by DerekParnell (admin) Jun 06, 2011
- 1282 views
dcole said...
What I want to do:
1. open window with ET1 in focus. (I know how to do that).
2. onKeyDown of ET1 I want focus to go to ET5 (not ET2).
3. onKeyDown of ET5 I want focus to go to ET9.
4. onKeyDown of ET9 I want focus to go back to ET1 and so on.
How can I do that?
According to the documentation on EditText controls, you need this ...
Note that when the user presses the Return Key, the focus will move to the next control in the focus order. To prevent this from happening, you need to set a w32HKeyPress handler that sets the return value to -1 when a VK_RETURN key without shifts is received.
procedure IgnoreReturn(integer self, integer event, sequence parms) if parms[1] = VK_RETURN and parms[2] = 0 then returnValue(-1) end if end procedure setHandler(myEditField, w32HKeyPress, routine_id("IgnoreReturn")