September 2012
Intermediate to advanced
464 pages
10h 55m
English
The Tab key in a typical user interface can be used to move the keyboard focus from one control to another (with Shift + Tab working in the reverse order), providing keyboard navigation capabilities without the need to use the mouse. This has to be logical – that is, the focus should not jump erratically all over the place, but rather move to the next logical control within the UI. The following recipe shows how to set the tab order and how to set the focus to a given control.
Make sure Visual Studio is up and running.
We'll create a personal information entry form that uses tab order in a logical manner, and places the keyboard focus where it makes sense when the form first appears: