GrapeCity.Win.Bars 名前空間 > GcTrackBar クラス : Orientation プロパティ |
Public Property Orientation As Orientation
public Orientation Orientation {get; set;}
例外 | 解説 |
---|---|
System.ComponentModel.InvalidEnumArgumentException | 指定された値が System.Windows.Forms.Orientation 値の 1 つではありません。 |
次のサンプルコードは、いくつかのプロパティの設定方法と、垂直方向の GcTrackBar コントロールを作成する方法を示します。
private void CreateGcTrackBarWithVerticalOrientation() { // Create a instance of GcTrackBar. GrapeCity.Win.Bars.GcTrackBar gcTrackBar1 = new GrapeCity.Win.Bars.GcTrackBar(); // Initialize the Name, Location and Size of GcTrackBar gcTrackBar1.Name = "gcTrackBar1"; gcTrackBar1.Location = new System.Drawing.Point(8, 8); gcTrackBar1.Size = new System.Drawing.Size(45, 224); // Set Orientation to Vertical. gcTrackBar1.Orientation = Orientation.Vertical; // Set the upper limit of thumb value. gcTrackBar1.Maximum = 30; // Set the lower limit of thumb value. gcTrackBar1.Minimum = 5; // Set the distance value between each tick-mark. gcTrackBar1.TickFrequency = 5; // Add gcTrackBar1 to the form this.Controls.Add(gcTrackBar1); }
Private Sub CreateGcTrackBarWithVerticalOrientation() ' Create a instance of GcTrackBar. Dim gcTrackBar1 As New GcTrackBar() ' Initialize the Name, Location and Size of GcTrackBar gcTrackBar1.Name = "gcTrackBar1" gcTrackBar1.Location = New System.Drawing.Point(8, 8) gcTrackBar1.Size = New System.Drawing.Size(45, 224) ' Set Orientation to Vertical. gcTrackBar1.Orientation = Orientation.Vertical ' Set the upper limit of thumb value. gcTrackBar1.Maximum = 30 ' Set the lower limit of thumb value. gcTrackBar1.Minimum = 5 ' Set the distance value between each tick-mark. gcTrackBar1.TickFrequency = 5 ' Add gcTrackBar1 to the form Me.Controls.Add(gcTrackBar1) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2