Version

Position Tabs at desired locations

Tabs in WinTab can be ordered or repositioned at run-time by either manually dragging and re-positioning, provided the AllowTabMoving property is set to true. It is also possible through code, using the Tab object’s Reposition method VisibleIndex property.

This topic assumes you have a WinTab control dropped onto the form that has four Tabs in it. The following code shows how Tabs can be re-positioned.

In Visual Basic:

' Set the index postion for Tab 0 at postion 2
Me.ultraTabControl1.Tabs(0).VisibleIndex = 2
' Repostion Tab 0 after Tab 3
Me.ultraTabControl2.Tabs(0).Reposition(Me.ultraTabControl2.Tabs(3), Infragistics.Win.RelativePosition.After)

In C#:

// Set the index postion for Tab 0 at postion 2
this.ultraTabControl1.Tabs[0].VisibleIndex = 2;
// Repostion Tab 0 after Tab 3
this.ultraTabControl2.Tabs[0].Reposition(this.ultraTabControl2.Tabs[3], Infragistics.Win.RelativePosition.After);