问题
I have a tab order set, but have rearranged a lot of controls, added more, removed some. So now when I click view Tab Order it show the tab oeders by cluttering the screen with tons of numbers. Is there a way to clear these and start over? I tried setting tabstop to false on the controls, hoping it would 'clear' their entries in the View Tab Order, but when I go back to view the tab order they still have numbers in them.
Any assistance would be greatly appreciated.
回答1:
Those numbers are the order that your controls will be hit when pressing the 'Tab' key. When in View Tab Order mode, you can click on the controls in the order that you want them to be hit. That will re-order them. You'll notice that the numbers start changing as you click.
Here's the MSDN page on how to do Tab Order.
回答2:
None of the provided answers really satisfied me. With the accepted one, you still have to go through each control...
Here's what I did:
- Open the [Form].Designer file.
- Quick replace with regular expressions: .TabIndex = {.+}, replace with: .TabIndex = 99 or whatever highest number you want (or even zero (0)).
- THEN go to design view and set the order via Tab Order command
回答3:
In case some other will have the same issue(you may also see print screens in link): First step: as you are in Design View of your form in menu go to View and select Tab Order. Second step: on your controls will appear a number that represents the Tab Order of your control. For re - setting tab order press a click in ascending order the controls that want to succeed, including Labels(even they are not selectable). I hope it is very intuitive this step for you too. Print screens at: http://how-to-code-net.blogspot.ro/2013/06/how-to-set-tab-order-for-controls-in.html
回答4:
I found the tools that VS provides to help with tab order to be lacking, but I found another tool that could help you.
https://stackoverflow.com/a/13256814/271351
回答5:
Use "Send to Back" and "Bring to Front" to Shuffle the order of the docked controls.
回答6:
Try to search for this.groupBox1.Controls.Add(this.txtTextBox1); and check is it added to the same groupbox.
来源:https://stackoverflow.com/questions/7010564/how-can-i-to-remove-or-reset-the-tab-order-in-vs-2010