Solved

Tab order

Posted on 2016-07-28
16
53 Views
Last Modified: 2016-07-28
I have a form with a lot of controls, including panels.  I can't get my tab order correct, even though I'm setting all the TabIndex values correctly, as far as I can tell.   Also, it seems like controls within a panel can have their own order?  I tried using the View/Tab Order menu item, but that gives me a bunch of numbers that make no sense to me.  See image.

How get I set the tab order correctly?  It is maybe better/easier to do at run time?

 View - Tab Order
0
Comment
Question by:HLRosenberger
  • 9
  • 6
16 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 41733284
that's lot of controls!

you normally click the first control, the the second one, then the 3rd, .... that will set the tab order but seeing the number you have, it will be a pane!

I use the 3rd party tool named mz-tools (http://mztools.com/). it has a nice/better tab order utility
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733289
A pain.  I agree!  What are those numbers?  63.1, 63.1.1.193, etc?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733291
I installed it.  Just briefly - how do I use once installed?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733296
I see this:

tabs
0
 
LVL 32

Expert Comment

by:sarabande
ID: 41733304
you may open the .rc file with a text editor (choose open with... in visual studio).

then search your form and bring all the controls you see into the right order. the tab order only is determined by the order the controls are placed in the .rc file.

Sara
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 41733314
there is a button named Automatic. if you click on it, it will do its best to reorder your controls.
and you can always use the 2 arrows to modify the ordering
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733410
but I don't understand the numbers.  What so large?  Why decimal places?  I was expected to just see the tabindex property values.
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 41733428
this is the winforms designer!

the . represents level. i see that you have a panel containing tabs containing group containing panels ...
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733515
correct.  I don't see how to change the order using MZTools?  All it allows me to do is navigate the list???
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 41733605
as I wrote before, the "automatic" button at the top will try to reorder all your controls based on the container object and their location. Once you have done this, if any are misplaced, you can use the 2 arrows (on the left of the automatic button) to fine-tune the ordering
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733629
Yes, I did automatic, and that did a good job. However, if I look at the TabIndex property, they are all set to 1.  How does this thing work?   Also, they are two textboxes  I want to make last in the tab order.   I cant move it by itself I suppose, because it's on a panel.  I can move it's parent panel, but only so far.  Seems like I can only move it to the "end" of it's parent panel.  Does that make sense?  If I want to move it to the very end of the tab order for the form, I need to move it off it's panel, I suppose.
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 41733639
>>if I look at the TabIndex property, they are all set to 1.  

If you run the application and tab through the control, are they in the correct order?

>>Also, they are two textboxes  I want to make last in the tab order.  

Click on one of the textbox and use the arrow to move it down. Repeat for the second control.

>>I cant move it by itself I suppose, because it's on a panel.  

You won't be able to move them outside the scope of the panel for sure.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733702
yes, the Auto button did a good job.   At runtime, they are in the correct order.  But I don't understand how/why?   How can that be when all the TabIndex properties are set to 1?

And correct.  I can't more outside the panel.   But I thought the tab order on a windows form could be set independently of the parent container?
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41733734
>>How can that be when all the TabIndex properties are set to 1?

I am not experiencing that behavior. So I can't really tell!

>>But I thought the tab order on a windows form could be set independently of the parent container?

You could try to set the TabIndex property to 99 manually from the property window of the control.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41733746
well, it's works just fine.  I just don't get how, when all the TabIndex properties are set to 1.

Thanks!
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41733747
thanks.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now