Ecere SDK/eC Forums • View topic - TAB order




Ecere SDK/eC Forums

Ecere Developers Community

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.

TAB order

Postby shakeshuck » Wed Dec 02, 2015 4:47 pm

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

Re: TAB order

Postby jerome » Wed Dec 02, 2015 5:41 pm

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

Re: TAB order

Postby shakeshuck » Fri Dec 11, 2015 12:50 pm

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

Re: TAB order

Postby jerome » Fri Dec 11, 2015 2:36 pm

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

Re: TAB order

Postby shakeshuck » Fri Dec 11, 2015 2:48 pm

Ah yes, my stupidity strikes again :oops:

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

D'oh! :roll:
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm


Return to GUI Toolkit & 2D Graphics

Who is online

Users browsing this forum: No registered users and 1 guest

cron