A useful tip for those that haven’t developed Windows forms applications or that don’t have a lot of experience on it. What if you had to change the tab order for 2 controls on a form? Easy? Fast? What about a form with 50 controls?
Sometime ago it used to take a lot of time to select each control and change the TabIndex property on the property window. The Visual Studio has a feature (that is not new) where you can change the tab order in a few clicks.
- Open your Windows Form application;
- Open the form you want to set the tab order;
- Go to View menu and select Tab Order;
- Each control on your form displays a number on the top left corner. If you have a container such as a GroupBox control, the container will have the tab index number and its child controls will display the container index plus an internal sequential index separated by a dot;
- To change the tab order for all controls you just need to click on all controls, one at a time. If you click on a container child control though, you are going to set the tab index only inside the container. You still need to set the container tab index.