Tab Order - arghhhhhh!

  1. 5 years ago

    Hi,
    I have a window containing TextFields and PopupMenus.

    I have set "Accept Tabs" in the property inspector to "False" for all of them.
    I have also set "Tab Stop" to "On" for all of them.

    However, when I open the window and try to tab - nothing happens.
    It refuses to tab from the first TextField to the next PopupMenu.

    Once I click on any of the other TextFields or PopupMenus, the tabbing cycles through correctly.
    The only problem is tabbing from the first (tab index1) TextField, to the second (tab index2) PopupMenu.

    Also, my TextFields and PopupMenus are ListIndexed correctly (from 1 at the top, to 6 at the bottom).

    Could anyone help me - it's driving me nuts :(

    @Richard S It simple refuses to tab from Index0 to Index 1.

    Lost for lost, this should work. Add Keydown event to your first control with this :

    Function KeyDown(Key As String) As Boolean
    
      if Key = chr(9) then 
        TextField2.SetFocus
      end if
    
    End Function

    My second item is TextField2. You want to place the name of your second control there.
    I removed the tab stop from the first control in my test app and it still cycles gently from 0 to 1 :)

    *** In case you feel like starting yet another thread, don't count me in. I have waisted enough time :/

  2. Eli O

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

    I assume that no control is selected after the window has opened. As far as I know you have to set focus to the first control in the window's Open() event (on OS X this happens automatically).

  3. Greg O

    24 Feb 2014 Xojo Inc

    Also check the tab order editor and make sure the fields appear in the correct order.

  4. ELI:
    The first control does has focus, because the carat flashes in the first TextField upon page opening.

    Greg:
    Tab order editor???
    I have set the tab indexes correctly (1 on the first control, 6 on the last), and TabStop is set to On for all of them.

    Is there another tab editor somewhere?

    Thanks.

  5. Greg O

    24 Feb 2014 Xojo Inc

    There is. In the Layout Editor, there is a button on the editor toolbar.

  6. Edited 5 years ago

    Ok, at the top I have found a button called Tab Order Editor.
    When I click the button, a windows pops up with my TextFields, PopupMenus, AND the LABELS which are on the page.

    I guess I need to remove the Labels from the tabbing order but how do I do that?
    I have already set the tab index to 0 for all labels, in the property inspector.

    Thanks for your patience :)

  7. Michel B

    24 Feb 2014 Pre-Release Testers RubberViews.com

    @Richard S I have already set the tab index to 0 for all labels, in the property inspector.

    Zero means tabs will start there. Set the first item you want selected to zero, set the labels tabindex to something much higher than the total number of controls, and you should be fine.

  8. Markus W

    24 Feb 2014 Pre-Release Testers #JeSuisHuman Germany, Heidelb...

    @Richard S I have already set the tab index to 0 for all labels, in the property inspector..

    That is not possible. Are you mixing up tab order and index by any chance?

  9. Ok,
    My controls (which I want to tab through) from the top to the bottom are indexed 0-6.
    Accept Tabs are set to OFF.
    Tab Stops are set to ON.
    The TextFields and Labels which I do not want to be involved with tabbing and indexed 55-60.

    The Tab Order Editor displays my controls in the right order, but still shows unwanted controls at the bottom of the list. Do these need to be removed somehow?

  10. Michel B

    24 Feb 2014 Pre-Release Testers RubberViews.com

    @Richard S Ok,
    My controls (which I want to tab through) from the top to the bottom are indexed 0-6.
    Accept Tabs are set to OFF.
    Tab Stops are set to ON.
    The TextFields and Labels which I do not want to be involved with tabbing and indexed 55-60.

    The Tab Order Editor displays my controls in the right order, but still shows unwanted controls at the bottom of the list. Do these need to be removed somehow?

    It should work.

  11. Greg O

    24 Feb 2014 Xojo Inc

    Richard - just include them in the tab order. If your user is using a screen reader, it'll make life a lot easier on them. Most of the OSs automatically ignore them now anyway.

    For what it's worth, you can drag items up and down in that list to adjust the tab order. I find that a lot easier than dealing with the TabIndex properties.

  12. Argghhhhhhhhhhhhhhh ! :(

    Michael was kind enough to inform me that it SHOULD now work - but it doesn't :(

  13. Michel B

    24 Feb 2014 Pre-Release Testers RubberViews.com

    @Richard S However, when I open the window and try to tab - nothing happens.
    It refuses to tab from the first TextField to the next PopupMenu.

    Once I click on any of the other TextFields or PopupMenus, the tabbing cycles through correctly.
    The only problem is tabbing from the first (tab index1) TextField, to the second (tab index2) PopupMenu.

    If the first TextField is TabIndex 0, it should have the focus when you open the window. Tabbing works only between focused items. If for some reason your first field was not focused as default, add firstcontrol.SetFocus in the window open event and you should be fine.

  14. Michel:
    The first control does have focus because the Carat is flashing inside it when the window opens.

    I can't understand why it cycles through all the other controls perfectly (even from the last to the first), BUT refuses to cycle from the first (tab index 0) to the second (tab index1).

    :(

  15. Michel B

    24 Feb 2014 Pre-Release Testers RubberViews.com

    @Richard S It refuses to tab from the first TextField to the next PopupMenu.

    I just tried a quick test app, and it seems although popumenu has a tab index, it does not get the focus. However, It tabs fine to the next TextField in the order.

  16. In my project it can tab correctly from a TextField to a PopupMenu, to another TextField. (alternating between any type of control).

    It just won't tab from TabIndex 0 to TabIndex 1.

    :(

    Is this a XOJO bug then?

  17. Eli O

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

    Have you set in the system preferences under "Keyboard -> Shortcuts", that all controls are reacting for tabbing ("Full keyboard access")?

  18. System preferences of Windows 8? Or are you talking about in Xojo?

  19. Using Windows, and I believe you are referring to OS X system preferences which is therefore, non-applicable in this case unfortunately.

    It simple refuses to tab from Index0 to Index 1.
    It is as if Index 0 is set not to tab to another control?

    Hope someone can work out what is going wrong.

    Thank you all for continuing to try and help.

  20. Michel B

    24 Feb 2014 Pre-Release Testers Answer RubberViews.com
    Edited 5 years ago

    @Richard S It simple refuses to tab from Index0 to Index 1.

    Lost for lost, this should work. Add Keydown event to your first control with this :

    Function KeyDown(Key As String) As Boolean
    
      if Key = chr(9) then 
        TextField2.SetFocus
      end if
    
    End Function

    My second item is TextField2. You want to place the name of your second control there.
    I removed the tab stop from the first control in my test app and it still cycles gently from 0 to 1 :)

    *** In case you feel like starting yet another thread, don't count me in. I have waisted enough time :/

  21. Newer ›

or Sign Up to reply!