Freigeben über


TrackBar.Orientation-Eigenschaft

Ruft einen Wert ab, der die horizontale oder vertikale Ausrichtung der Trackleiste angibt, oder legt diesen fest.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
<LocalizableAttribute(True)> _
Public Property Orientation As Orientation
'Usage
Dim instance As TrackBar
Dim value As Orientation

value = instance.Orientation

instance.Orientation = value
[LocalizableAttribute(true)] 
public Orientation Orientation { get; set; }
[LocalizableAttribute(true)] 
public:
property Orientation Orientation {
    Orientation get ();
    void set (Orientation value);
}
/** @property */
public Orientation get_Orientation ()

/** @property */
public void set_Orientation (Orientation value)
public function get Orientation () : Orientation

public function set Orientation (value : Orientation)

Eigenschaftenwert

Einer der Orientation-Werte.

Ausnahmen

Ausnahmetyp Bedingung

InvalidEnumArgumentException

Der zugewiesene Wert ist keiner der Orientation-Werte.

Hinweise

Wenn die Orientation-Eigenschaft auf Orientation.Horizontal festgelegt ist, bewegt sich das Bildlauffeld mit dem Erhöhen von Value von links nach rechts. Wenn die Orientation-Eigenschaft auf Orientation.Vertical festgelegt ist, bewegt sich das Bildlauffeld mit dem Erhöhen von Value von unten nach oben.

Beispiel

Im folgenden Beispiel wird das Festlegen einiger TrackBar-Eigenschaften veranschaulicht.

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
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 = trackBar1->Width;
trackBar3->Height = trackBar1->Width;
trackBar1->LargeChange = 16;
trackBar2->LargeChange = 16;
trackBar3->LargeChange = 16;
trackBar2.set_Orientation(Orientation.Vertical);
trackBar3.set_Orientation(Orientation.Vertical);
trackBar1.set_Maximum(255);
trackBar2.set_Maximum(255);
trackBar3.set_Maximum(255);
trackBar1.set_Width(400);
trackBar2.set_Height(trackBar1.get_Width());
trackBar3.set_Height(trackBar1.get_Width());
trackBar1.set_LargeChange(16);
trackBar2.set_LargeChange(16);
trackBar3.set_LargeChange(16);

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

TrackBar-Klasse
TrackBar-Member
System.Windows.Forms-Namespace
Orientation-Enumeration