PowerTools PlusPak for Windows Forms 8.0J
DisableAllItems メソッド (GcRadioGroupBox)
使用例 

GcRadioGroupBoxコントロールに含まれるすべての項目を無効にします。
構文
Public Sub DisableAllItems() 
public void DisableAllItems()
使用例
次のサンプルコードは、EnableAllItemsメソッドとDisableAllItemsメソッドを使用してGcRadioGroupBoxコントロール内のすべての項目を有効または無効にする方法を示します。この例では、button3をクリックすると、すべての項目が無効状態の場合は有効に、すべての項目が有効状態の場合は無効に変更された後、ボタンのテキストが更新されます。このサンプルコードは、GcRadioGroupBoxクラスの概要に示されている詳細なコード例の一部を抜粋したものです。
// Click button2 will enable or disable all items.
private void button2_Click(object sender, EventArgs e)
{
    if (AreAllItemsDisabled)
    {
        this.gcRadioGroupBox1.EnableAllItems();
    }
    else
    {
        this.gcRadioGroupBox1.DisableAllItems();
    }

    // Update button3's text to appropriate value.
    this.UpdateButton2Text();
}
' Click button2 will enable or disable all items.
Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
    If AreAllItemsDisabled Then
        Me.gcRadioGroupBox1.EnableAllItems()
    Else
        Me.gcRadioGroupBox1.DisableAllItems()
    End If

    ' Update button3's text to appropriate value.
    Me.UpdateButton2Text()
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

参照

GcRadioGroupBox クラス
GcRadioGroupBox メンバ
EnableAllItems メソッド
EnableAllItems メソッド

Send Feedback