Tab Order
Maintaining tab order can be time-consuming on complex screens. Inserting a control between existing fields requires renumbering the controls that follow it. Wisej.NET provides design-time and runtime tools to automate this work, including on forms with many nested controls.
Designer
At design time use "Tab Order" button in the designer toolbar to enter "tabbing mode". It will give you three options: Manual, Horizontal and Vertical.
Select Manual to enter "tabbing mode", then click each control in the desired sequence. If you miss a control, restart the sequence to assign the intended order.
-1245e017bca6c90ff12a523bd3c8fed8.png)
Press Horizontal or Vertical and Wisej.NET automatically renumbers all the tab indexes using a horizontal or vertical navigation algorithm and enters "tabbing mode".
-bc6d419e0f3b8f0eb4cd9df0ae822e58.png)
TabOrderManager Extender
Sometimes you may want to use horizontal tabbing in one container and vertical tabbing in another, or disable renumbering altogether. The Wisej.NET TabOrderManager component allows you to do that at design time.
Drop the TabOrderManager on the designer and all containers in the design surface will expose a new extender property named TabOrder allowing you to set the order direction for each container.
Change Programmatically
The same design-time issue is present at runtime when the Wisej.NET application adds or removes controls dynamically. In code you can go through the controls collection and assign new tab indexes. However, the assignment becomes more complicated when there are containers and nested containers.
In code you can create an instance of the Wisej.NET TabOrderManager component or use an existing instance already created at design time. This component exposes a number of methods that will help your code update the tabbing order.