Re: focus problem

new topic     » goto parent     » topic index » view thread      » older message » newer message
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") 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu