Hi guys,
Is there a method for specifying the order controls are accessed when using the TAB key?
I see that by default, controls are tabbed to in the order they are defined in the code, and oddly the LAST to be defined is the one with focus when the app is started?
Or again, have I missed a property somewhere?
Cheers!
TAB order
Re: TAB order
Hi shakeshuck,
You're very good at figuring this out![Wink ;)](./images/smilies/icon_e_wink.gif)
That's exactly how it works.
Yes, it's kind of awkward.
Definitely something we hope to improve in the whole GUI revamp/overhaul.
The reason the last one is the one that is defined is because it is the last one that is created and controls are activated by default upon creation.
Unfortunately, there's no way to define the cycling order other than the order of creation.
If you want, you can define them in the order that they should be, and you can manually activate the first control in the dialog's OnPostCreate() by calling myControl.MakeActive();
Regards,
Jerome
You're very good at figuring this out
![Wink ;)](./images/smilies/icon_e_wink.gif)
That's exactly how it works.
Yes, it's kind of awkward.
Definitely something we hope to improve in the whole GUI revamp/overhaul.
The reason the last one is the one that is defined is because it is the last one that is created and controls are activated by default upon creation.
Unfortunately, there's no way to define the cycling order other than the order of creation.
If you want, you can define them in the order that they should be, and you can manually activate the first control in the dialog's OnPostCreate() by calling myControl.MakeActive();
Regards,
Jerome
-
- Posts: 31
- Joined: Tue Dec 01, 2015 6:52 pm
Re: TAB order
Hi Jerome,
I've just hit another issue with tabs, although perhaps there is an alternative to the way I've done things in order to avoid the problem...?
In order to split my UI into related parts, I used child windows for groups of controls on a single parent.
I have now noticed that when tabbing from one control to the next it stays within a child window; I would have expected it to get to the last control within a child then traverse to the next child window, but this does not seem to be the case (it tabs back to the first control in the child).
I've just hit another issue with tabs, although perhaps there is an alternative to the way I've done things in order to avoid the problem...?
In order to split my UI into related parts, I used child windows for groups of controls on a single parent.
I have now noticed that when tabbing from one control to the next it stays within a child window; I would have expected it to get to the last control within a child then traverse to the next child window, but this does not seem to be the case (it tabs back to the first control in the child).
Re: TAB order
Hi shakeshuck,
This should work as you expect.
Did you set 'tabCycle' to true on both levels of parent windows?
Note you can use the plain Window or you can also use the Label class with 'isGroupBox = true' for this purpose.
(Also Stacker may be useful to automatically stack things without having to specify positions for everything, but if used heavily this may currently suffer from performance problems).
-Jerome
This should work as you expect.
Did you set 'tabCycle' to true on both levels of parent windows?
Note you can use the plain Window or you can also use the Label class with 'isGroupBox = true' for this purpose.
(Also Stacker may be useful to automatically stack things without having to specify positions for everything, but if used heavily this may currently suffer from performance problems).
-Jerome
-
- Posts: 31
- Joined: Tue Dec 01, 2015 6:52 pm
Re: TAB order
Ah yes, my stupidity strikes again
I had tabCycle set on the children but not on the parent.
D'oh!![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
![Embarrassed :oops:](./images/smilies/icon_redface.gif)
I had tabCycle set on the children but not on the parent.
D'oh!
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)