Tab Order - arghhhhhh!

  1. ‹ Older
  2. 5 years ago

    Thank you so much for all your help - much appreciated!
    Sorry if I have wasted your time :(

    Once again - THANK YOU.

  3. Tim H

    24 Feb 2014 Pre-Release Testers Portland, OR USA

    If trapping the Tab key in Keydown fixes it, then it certainly is a bug of some kind, although it seems hard to duplicate. Can you duplicate it in a small project and submit it to Xojo?

  4. Michel:

    Your code solved the problem !
    Unfortunately it now causes the user's system to beep when the second control receives focus :(

    Any ideas anyone?

    Thank you all.

  5. Eli O

    is not verified 25 Feb 2014 Europe (Berlin, Germany)

    You have to "Return True" after you have handled the key press in KeyDown.

  6. last year
    Edited last year

    Sorry for necromancing this thread...

    I'm developing a desktop app, where the main GUI is setup by data from a file, placing a bunch of ContainerControls inside a GroupBox inside a GroupBox (so I can scroll the chunk using a scrollbar).

    Now, the ContainerControls (which each have a small GUI on them) are added top->down, the first added at top Y, the next at top+height_of-the_one_above+margin etc.

    But the Tab order is bottom first, and then it goes upwards, 5 - 4 -3 - 2 when hitting tab (and the correct order when hitting shift tab.

    How can you control this programatically as I do not know beforehand who will be after me (that is done at runtime, parsing a file, adding the objects. I could probably tell each of them who's next and who's before during creating, should I do my own tab handler in KeyDown for this or is there some magic API i've forgotten about / never heard of to handle it.

  7. Edited last year

    Ok, go back to sleep, I solved it using a double linked list in the parent ContainerControl, that "my" ContainerBlocks inherit from, and some init code. Xojo has come far, this is really a quite productive platform. No need to spend too much time figuring out how to do things, it's just implement, test and it works ;-)

  8. You don’t need to do this in code. There are two command bar buttons to help with tab order. One with a number in a box (manual) and the other looks like a Z (automatic).

  9. @Greg OLone You don’t need to do this in code. There are two command bar buttons to help with tab order. One with a number in a box (manual) and the other looks like a Z (automatic).

    Does that work with dynamically added controls as well?

  10. Edited last year

    @Totte A Does that work with dynamically added controls as well?

    No. They get added to the end.

  11. 2 months ago

    Dan B

    Jun 11 Pre-Release Testers, Xojo Pro

    Sorry for necromancing this thread... again

    I'm doing the similar thing as Totte was: Adding various ContainerControls to a parent ContainerControl.

    I expect the first created CC to get the focus first when hitting the tab-key. Instead it is the last created CC the recieves the tab-key.

    I suppose I could create the CC's backwards but that is not a very nice solution IMO.

    I reported this back in 2011 in this case: Feedback Case #15947

or Sign Up to reply!