PowerTools PlusPak for Windows Forms 8.0J
VerticalAdjustment プロパティ
使用例 

LayoutModeLayoutMode.Tableのときの、行の調整方法を決定する値を取得または設定します。
構文
Public Property VerticalAdjustment As LineAdjustment
public LineAdjustment VerticalAdjustment {get; set;}

プロパティ値

LineAdjustment値の1つ。デフォルトはLineAdjustment.Noneです。
例外
例外解説
System.ComponentModel.InvalidEnumArgumentException指定された値がLineAdjustment値の1つではありません。
解説
VerticalAdjustmentLayoutMode.Tableモードの場合にのみ適用されます。
使用例

次のサンプルコードは、GcCheckedGroupBox.LayoutSettingsプロパティ上でVerticalAdjustmentプロパティをLineAdjustment.Averageに設定して、チェックボックス項目を垂直方向に平均的にレイアウトします。この例を実行するには、以下のコードをSystem.Windows.Forms.Formに追加し、ここで作成したメソッドをコンストラクターまたはフォーム上の別のメソッドから呼び出す必要があります。

private void InitializeLayoutSettingsWithAdjustment()
{
    GcCheckedGroupBox gcCheckedGroupBox = new GcCheckedGroupBox();

    // Set gcRadioGroupBox1's location.
    gcCheckedGroupBox.Location = new Point(10, 10);
    gcCheckedGroupBox.Text = "Table Layout Items";

    // Create some radio button items.
    CheckBoxItem[] items = new CheckBoxItem[] 
    {
        new CheckBoxItem("item1"),
        new CheckBoxItem("item2"),
        new CheckBoxItem("item3"),
        new CheckBoxItem("item4"),
        new CheckBoxItem("item5"),
    };

    // First add some items.
    gcCheckedGroupBox.Items.AddRange(items);

    // Customize the layout of items through LayoutSettings.
    gcCheckedGroupBox.LayoutSettings.LayoutMode = LayoutMode.Table;
    gcCheckedGroupBox.LayoutSettings.Orientation = Orientation.Vertical;
    gcCheckedGroupBox.LayoutSettings.RowCount = 3;
    gcCheckedGroupBox.LayoutSettings.HorizontalAdjustment = LineAdjustment.Average;
    gcCheckedGroupBox.LayoutSettings.VerticalAdjustment = LineAdjustment.Average;

    // Add gcRadioGroupBo1 to the form.
    this.Controls.Add(gcCheckedGroupBox);
}
Private Sub InitializeLayoutSettingsWithAdjustment()
    Dim gcCheckedGroupBox As New GcCheckedGroupBox()

    ' Set gcRadioGroupBox1's location.
    gcCheckedGroupBox.Location = New Point(10, 10)
    gcCheckedGroupBox.Text = "Table Layout Items"

    ' Create some radio button items.
    Dim items As CheckBoxItem() = New CheckBoxItem() {New CheckBoxItem("item1"), New CheckBoxItem("item2"), New CheckBoxItem("item3"), New CheckBoxItem("item4"), New CheckBoxItem("item5")}

    ' First add some items.
    gcCheckedGroupBox.Items.AddRange(items)

    ' Customize the layout of items through LayoutSettings.
    gcCheckedGroupBox.LayoutSettings.LayoutMode = LayoutMode.Table
    gcCheckedGroupBox.LayoutSettings.Orientation = Orientation.Vertical
    gcCheckedGroupBox.LayoutSettings.RowCount = 3
    gcCheckedGroupBox.LayoutSettings.HorizontalAdjustment = LineAdjustment.Average
    gcCheckedGroupBox.LayoutSettings.VerticalAdjustment = LineAdjustment.Average

    ' Add gcRadioGroupBo1 to the form.
    Me.Controls.Add(gcCheckedGroupBox)
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

参照

LayoutSettings クラス
LayoutSettings メンバ
HorizontalAdjustment プロパティ
LineAdjustment 列挙体
HorizontalAdjustment プロパティ
LineAdjustment 列挙体

Send Feedback