Jump to content
dummzeuch

Set Tab Order expert

Recommended Posts

The Set Tab Order Expert has two modes, the first one is simple: It displays a tree view of the currently selected control and allows you to move child controls by dragging them to other positions or using the new (since last weekend) buttons to move them up or down.

 

The second mode is more complex: If you have selected more than one control (which must share the same parent), they are listed in the reverse(!) order in which you selected them. After you press OK, their tab order will be changed to that order.

 

I didn't even know about this second mode until I just now found that code and read up on it in the documentation. Now I wonder whether it is a bug that the reverse order is being used. I think it's counter intuitive. If I want to set the tab order of controls, I would normally select them in the order I want the tab order to be.

 

Is that just me? Do you use that functionality?

 

(I am aware that CnPack does it very differently (and I like that approach up to a point) but that's not the topic here.)

  • Like 1

Share this post


Link to post
55 minutes ago, Primož Gabrijelčič said:

I almost exclusively use the "select controls in the desired order, activate the expert" mode. Been using it since who-knows-when. 

 

So you don't think that the reverse order in this case is a bug?

Share this post


Link to post

I don't understand what "reverse order" you are talking about.

 

  1. Click on first control, shift-click on the second control, shift-click on the third control.
  2. GExperts, Set Tab Order
  3. Controls are listed in the order I clicked them: 1, 2, 3.

 

Share this post


Link to post

That's not what I have seen when I tried it last weekend (after I became aware of this feature). The order was always reversed to what I was expecting. Maybe I had just broken it, but I don't remember changing anything in the sorting related code. I'll go back to a previous revision and test again.

Thanks for the feedback.

Share this post


Link to post

I'm using your experimental version 1.3.9.59 in Berlin, if that's of any help.

 

As I was using quite old GExperts, I now tested with 1.3.10.63 experimental and with 1.3.11.64 experimental. Works fine in both.

 

I have recorded a short video showing how Set Tab Order works for me (and how it had always worked).

https://www.dropbox.com/s/t4p06tm58q4pj92/settab.mp4?dl=0

 

IIRC, this way of setting tab order was actually the primary mode for this expert in the beginning. Delphi had its clumsy Edit, Tab order and GExperts added the "select all, activate expert" expert. IIRC in the beginning there was no dialog - tab order got set and that was that. (I could be mistaken, of course.)

Share this post


Link to post

Apparently this only works if the expert is called via a keyboard shortcut or the GExperts menu. If it's called via the designer popup menu, the sort order ist reversed. Really odd.

Share this post


Link to post

Might be pretty difficult to make it but sometimes  I've been pondering what would be quick way.

  1. Get screenshot of the Form
  2. Paint line(s) in order you'd like tabs go.

Not best in all cases, but many it would be super fast. 

 

-Tee-

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×