Export (0) Print
Expand All
Expand Minimize

TabAlignment Enumeration

Specifies the locations of the tabs in a tab control.

[Visual Basic]
<Serializable>
Public Enum TabAlignment
[C#]
[Serializable]
public enum TabAlignment
[C++]
[Serializable]
__value public enum TabAlignment
[JScript]
public
   Serializable
enum TabAlignment

Remarks

This enumeration is used by members such as TabControl.Alignment.

Members

Member name Description
Bottom The tabs are located across the bottom of the control.
Left The tabs are located along the left edge of the control.
Right The tabs are located along the right edge of the control.
Top The tabs are located across the top of the control.

Example

[Visual Basic, C#] The following code example demonstrates how to use the TabAlignment enumeration. To run the example, paste the following code in a form containing a TabControl called TabControl1. Call the ChangeTheLookOfTheTabControl method in the form's constructor or Load method.

[Visual Basic] 
Private Sub ChangeTheLookOfTheTabControl()

    ' Set the size and location of the TabControl.
    Me.TabControl1.Location = New System.Drawing.Point(20, 20)
    TabControl1.Size = New System.Drawing.Size(250, 250)

    ' Align the tabs along the bottom of the control.
    TabControl1.Alignment = TabAlignment.Bottom

    ' Change the tabs to flat buttons.
    TabControl1.Appearance = TabAppearance.FlatButtons
End Sub

[C#] 
private void ChangeTheLookOfTheTabControl()
{

    // Set the size and location of the TabControl.
    this.TabControl1.Location = new System.Drawing.Point(20, 20);
    TabControl1.Size = new System.Drawing.Size(250, 250);

    // Align the tabs along the bottom of the control.
    TabControl1.Alignment = TabAlignment.Bottom;

    // Change the tabs to flat buttons.
    TabControl1.Appearance = TabAppearance.FlatButtons;
}

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Windows.Forms

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Windows.Forms (in System.Windows.Forms.dll)

See Also

System.Windows.Forms Namespace | TabControl

Show:
© 2014 Microsoft