Advertisement
7_2009-2012 Coding Standards #226276

Quick Tab Order

Quick tip for setting control tab order quickly.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
A speedy way to set the tab order is to work thru the controls in reverse order setting the tab stop property to 0 on each. When you reach the first control the tab order is set.
When setting the same property on successive controls there is no need to bounce from the form to the property page. Once the focus is set to that property the first time it remains on that property (if available) with each object that receives focus from that point. In the above example setting the tab stop would be... control.. 0, control... 0, control... 0.
To get the effect of setting focus to a control by clicking on it's label, as in Access, simply set the tab stop for the label as the next in order before the control that it labels. Since a label can't receive focus at run time the focus goes to the next object in tab order that can receive focus.
Original Comments (3)
Recovered from Wayback Machine