TrackBar.Orientation Propriété

Définition

Obtient ou définit une valeur indiquant l'orientation horizontale ou verticale de la barre de suivi.

public:
 property System::Windows::Forms::Orientation Orientation { System::Windows::Forms::Orientation get(); void set(System::Windows::Forms::Orientation value); };
public System.Windows.Forms.Orientation Orientation { get; set; }
member this.Orientation : System.Windows.Forms.Orientation with get, set
Public Property Orientation As Orientation

Valeur de propriété

Une des valeurs de l'objet Orientation.

Exceptions

La valeur assignée ne fait pas partie des valeurs Orientation.

Exemples

L’exemple suivant montre comment définir certaines des TrackBar propriétés.

trackBar2->Orientation = Orientation::Vertical;
trackBar3->Orientation = Orientation::Vertical;
trackBar1->Maximum = 255;
trackBar2->Maximum = 255;
trackBar3->Maximum = 255;
trackBar1->Width = 400;
trackBar2->Height = trackBar1->Width;
trackBar3->Height = trackBar1->Width;
trackBar1->LargeChange = 16;
trackBar2->LargeChange = 16;
trackBar3->LargeChange = 16;
trackBar2.Orientation = Orientation.Vertical;
trackBar3.Orientation = Orientation.Vertical;
trackBar1.Maximum = trackBar2.Maximum = trackBar3.Maximum = 255;
trackBar1.Width = 400;
trackBar2.Height = trackBar3.Height = trackBar1.Width;
trackBar1.LargeChange = trackBar2.LargeChange = trackBar3.LargeChange = 16;
trackBar2.Orientation = Orientation.Vertical
trackBar3.Orientation = Orientation.Vertical
trackBar1.Maximum = 255
trackBar2.Maximum = 255
trackBar3.Maximum = 255
trackBar1.Width = 400
trackBar2.Height = 400
trackBar3.Height = 400
trackBar1.LargeChange = 16
trackBar2.LargeChange = 16
trackBar3.LargeChange = 16

Remarques

Lorsque la propriété a la Orientation valeur Orientation.Horizontal, la zone de défilement se déplace de gauche à droite à mesure que le Value augmente. Lorsque la Orientation propriété est définie sur Orientation.Vertical, la zone de défilement se déplace de bas en haut à mesure que le Value augmente.

S’applique à

Voir aussi