TabAlignment, énumération
Mise à jour : novembre 2007
Spécifie l'emplacement des onglets dans un contrôle Tab.
Assembly : System.Windows.Forms (dans System.Windows.Forms.dll)
Cette énumération est utilisée par les membres tels que TabControl.Alignment.
L'exemple de code suivant illustre l'utilisation des propriétés TabControl.Alignment et TabControl.Appearance, ainsi que des énumérations TabAlignment et TabAppearance. Pour exécuter l'exemple, collez le code suivant dans un formulaire contenant un contrôle TabControl appelé TabControl1. Appelez la méthode ChangeTheLookOfTheTabControl dans le constructeur du formulaire ou la méthode Load.
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 void ChangeTheLookOfTheTabControl()
{
// Set the size and location of the TabControl.
this.tabControl1.set_Location(new System.Drawing.Point(20, 20));
tabControl1.set_Size(new System.Drawing.Size(250, 250));
// Align the tabs along the bottom of the control.
tabControl1.set_Alignment(TabAlignment.Bottom);
// Change the tabs to flat buttons.
tabControl1.set_Appearance(TabAppearance.FlatButtons);
} //ChangeTheLookOfTheTabControl
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professionnel Édition x64, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.