Total .NET Analyzer Rule Documentation  

TabStopNotSet Rule

Consider setting the TabStop property to true for controls that can have focus.

Remarks

In Windows applications, it is important for a form's tab order to be defined appropriately (generally from left to right, top to bottom). A control's TabStop property determines whether or not it is part of the tab order. If the TabStop property is set to False, the control will not receive focus when users press the [Tab] key to switch between controls. In general, the TabStop property should be set to True for all controls that can have focus.

You should examine forms with controls that have the TabStop property set to False. This may indicate that the tab order for a form has not been reviewed, and is set to its default.

Resolution

In general, you should change the TabStop property to True for controls that can have focus. Use the Windows Form Designer Properties Window to change the TabStop Property.

After changing the TabStop property, you should review the tab order to ensure that it is set appropriately. You can set the tab order visually at design time by following these steps:
1. View the form design.
2. From the Visual Studio .NET menu, choose View, Tab Order. A number will appear in the upper left corner of each control.
3. Click on the controls in the order you want them in the tab order.
4. Choose View, Tab Order from the Visual Studio .NET menu again to return to design mode.

Alternately, you can change tab order programmatically at runtime using the TabIndex property.

See Also

Changing the Tab Order