Afficher en anglais

Partage via


TabAlignment Énumération

Définition

Spécifie l'emplacement des onglets dans un contrôle Tab.

C#
public enum TabAlignment
Héritage
TabAlignment

Champs

Bottom 1

Les onglets sont situés le long du bord inférieur du contrôle.

Left 2

Les onglets sont situés le long du bord gauche du contrôle.

Right 3

Les onglets sont situés le long du bord droit du contrôle.

Top 0

Les onglets sont situés le long du bord supérieur du contrôle.

Exemples

L’exemple de code suivant montre comment utiliser les propriétés et TabControl.Appearance les TabControl.Alignment énumérations et les TabAlignment propriétésTabAppearance. 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 du formulaire ou la méthode Load.

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;
}

Remarques

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

S’applique à

Produit Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

Voir aussi