Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)?

like image 325
Brian Hooper Avatar asked May 25 '11 13:05

Brian Hooper


People also ask

What is the use of tab Index property of the control?

The following example uses the TabIndex property to display and set the tab order for individual controls. You can press Tab to reach the next control in the tab order and to display the TabIndex of that control. You can also click on a control to display its TabIndex.

What is the function of TabIndex property of controls on a form?

The TabIndex property of a control determines where it's positioned in the tab order.

Do all controls have a TabIndex property?

All controls have a TabIndex property. A control's border is determined by its BorderStyle property. Tab order is the order in which each control receives the focus when the user presses the Tab key. The Windows standard is to use sentence capitalization for identifying labels.

Which property of controls on a user form sets the order?

The tab order identifies the order in which controls receive the focus as the user tabs through a form or subform. The Cycle property determines the action to take when a user tabs from the last control in the tab order.


2 Answers

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.

like image 51
MarkJ Avatar answered Nov 07 '22 03:11

MarkJ


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.

like image 43
Marco Avatar answered Nov 07 '22 05:11

Marco