TabAlignment Énumération

Définition

Spécifie les emplacements des onglets dans un contrôle tabulation.

public enum class TabAlignment
public enum TabAlignment
type TabAlignment = 
Public Enum TabAlignment
Héritage
TabAlignment

Champs

Nom Valeur Description
Top 0

Les onglets se trouvent en haut du contrôle.

Bottom 1

Les onglets se trouvent en bas du contrôle.

Left 2

Les onglets se trouvent le long du bord gauche du contrôle.

Right 3

Les onglets se trouvent le long du bord droit du contrôle.

Exemples

L’exemple de code suivant montre comment utiliser les TabControl.Alignment propriétés et TabControl.Appearance les énumérations et TabAppearance les TabAlignment propriétés. Pour exécuter l’exemple, collez le code suivant dans un formulaire contenant un TabControl tabControl1 appelé. Appelez la méthode ChangeTheLookOfTheTabControl dans le constructeur ou la méthode Load du formulaire.

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

Remarques

Cette énumération est utilisée par les membres tels que TabControl.Alignment.

S’applique à

Voir aussi