Why do labels and frame have a "Tab Index" property in VB6?
Does anyone know why Labels and Frames (and possibly other开发者_高级运维 controls) have a TabIndex
property in VB6? Is there some use for it; some feature of GUI programming I ought to be incorporating in my applications (that I am blissfully unaware of)?
To confirm what Cody said in the comments. The VB6 manual entry for TabIndex says:
Controls that can't receive the focus (Frame and Label controls) remain in the tab order but are skipped during tabbing.
but
If you press the access key for a Frame or Label control, the focus moves to the next control in the tab order that can receive the focus.
TabIndex
is the property used to determine the sequence of focused controls when user presses TAB key.
If control with TabIndex=5
is focused and user presses TAB, control with TabIndex=6
will take focus.
精彩评论