Développer Réduire
Ce sujet n'a pas encore été évalué - Évaluez ce sujet

TabAlignment, énumération

Mise à jour : novembre 2007

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

Espace de noms :  System.Windows.Forms
Assembly :  System.Windows.Forms (dans System.Windows.Forms.dll)

public enum TabAlignment
public enum TabAlignment
public enum TabAlignment
Nom de membreDescription
TopLes onglets sont situés le long du bord supérieur du contrôle.
BottomLes onglets sont situés le long du bord inférieur du contrôle.
LeftLes onglets sont situés le long du bord gauche du contrôle.
RightLes onglets sont situés le long du bord droit du contrôle.

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.

.NET Framework

Pris en charge dans : 3.5, 3.0, 2.0, 1.1, 1.0
Cela vous a-t-il été utile ?
(1500 caractères restants)

Ajouts de la communauté

AJOUTER
© 2013 Microsoft. Tous droits réservés.