TAB order

General help with the Ecere Cross Platform GUI toolkit: Window, common controls, events, etc.
Help with the 2D Graphics library: Surface, Display, Bitmap, Font and others.
Post Reply
shakeshuck
Posts: 31
Joined: Tue Dec 01, 2015 6:52 pm

TAB order

Post by shakeshuck »

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!
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: TAB order

Post by jerome »

Hi shakeshuck,

You're very good at figuring this out ;)

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
shakeshuck
Posts: 31
Joined: Tue Dec 01, 2015 6:52 pm

Re: TAB order

Post by shakeshuck »

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).
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: TAB order

Post by jerome »

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
shakeshuck
Posts: 31
Joined: Tue Dec 01, 2015 6:52 pm

Re: TAB order

Post by shakeshuck »

Ah yes, my stupidity strikes again :oops:

I had tabCycle set on the children but not on the parent.

D'oh! :roll:
Post Reply