Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically change the tab order

How do I programmatically reorder the tabs in a TabControl? I need to sort the tabs depending on some conditions.

If it's possible to do the reordering through the designer, i guess we must be able to do it through code at runtime too.

like image 483
Aneef Avatar asked Apr 01 '10 09:04

Aneef


People also ask

How do I change the tab order in Visual Studio?

To set the tab order, you simply select all three textboxes, then select Tab Order from the View menu. Then just click the controls in the order you want the tabs to sit. As you click each control, the tab order will be displayed on the control to keep you up to date.

How do I change tab order in Visual Basic?

Tab order can be set in the Properties window of the designer using the TabIndex property. The TabIndex property of a control determines where it's positioned in the tab order. By default, the first control added to the designer has a TabIndex value of 0, the second has a TabIndex of 1, and so on.

What is tab order in a form?

Tab Order is the order or sequence that the cursor moves from field to field. Initially, the tab order is determined by the order in which the fields are added to the form.


1 Answers

You have to redefine your tab page collection, in order to change the index of your tab pages.

like image 137
thelost Avatar answered Sep 26 '22 21:09

thelost