TabAlignment Enum

Definition

Anger platserna för flikarna i en flikkontroll.

public enum class TabAlignment
public enum TabAlignment
type TabAlignment = 
Public Enum TabAlignment
Arv
TabAlignment

Fält

Name Värde Description
Top 0

Flikarna finns överst i kontrollen.

Bottom 1

Flikarna finns längst ned i kontrollen.

Left 2

Flikarna finns längs kontrollens vänstra kant.

Right 3

Flikarna finns längs kontrollens högra kant.

Exempel

Följande kodexempel visar hur du använder TabControl.Alignment egenskaperna och TabControl.Appearance och TabAlignmentTabAppearance uppräkningar. Om du vill köra exemplet klistrar du in följande kod i ett formulär med namnet TabControl TabControl1. Anropa metoden ChangeTheLookOfTheTabControl i formulärets konstruktor eller load-metod.

private:
   void ChangeTheLookOfTheTabControl()
   {
      // Set the size and location of the TabControl.
      this->TabControl1->Location = System::Drawing::Point( 20, 20 );
      TabControl1->Size = 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;
   }
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;
}
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

Kommentarer

Den här uppräkningen används av medlemmar som TabControl.Alignment.

Gäller för

Se även