Tab Order - arghhhhhh!

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 :frowning:

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).

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

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.

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

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 :slight_smile:

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.

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

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?

[quote=67310:@Richard Summers]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?[/quote]

It should work.

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.

Argghhhhhhhhhhhhhhh ! :frowning:

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

[quote=67281:@Richard Summers]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.[/quote]

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.

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).

:frowning:

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.

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.

:frowning:

Is this a XOJO bug then?

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

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

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.

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

[code]Function KeyDown(Key As String) As Boolean

if Key = chr(9) then
TextField2.SetFocus
end if

End Function
[/code]

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 :slight_smile:

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