TrackBar.Orientation 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定值,指出追蹤列的水平或垂直方向。
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
屬性值
其中一個 Orientation 值。
例外狀況
指派的值不是其中一個 Orientation 值。
範例
下列範例示範如何設定一些 TrackBar 屬性。
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
備註
Orientation當 屬性設定為 Orientation.Horizontal 時,捲動方塊會隨著增加而從左至右 Value 移動。 Orientation當 屬性設定為 Orientation.Vertical 時,捲動方塊會隨著增加而從下移至頂端 Value 。