GrapeCity.Win.Containers 名前空間 > GcRadioGroupBox クラス : CheckedItemChanged イベント |
Public Event CheckedItemChanged As EventHandler(Of CheckedItemChangedEventArgs)
public event EventHandler<CheckedItemChangedEventArgs> CheckedItemChanged
イベント ハンドラが、このイベントに関連するデータを含む、CheckedItemChangedEventArgs 型の引数を受け取りました。次の CheckedItemChangedEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
CurrentCheckedItem | 現在のオン状態の項目を取得します。 |
OriginalCheckedItem | 変更前のオン状態の項目を取得します。 |
// Update the items for listBox1 when item checked changed in gcRadioGroupBox1, private void gcRadioGroupBox1_CheckedItemChanged(object sender, CheckedItemChangedEventArgs e) { if (e.CurrentCheckedItem != null) { // Use special styles for checked items. e.CurrentCheckedItem.ForeColor = Color.Red; e.CurrentCheckedItem.Font = new Font(e.CurrentCheckedItem.Font, FontStyle.Bold); } if (e.OriginalCheckedItem != null) { // Reset these properties will cause the properties to retreive their values from gcRadioGroupBox1. e.OriginalCheckedItem.ForeColor = Color.Empty; e.OriginalCheckedItem.Font = null; } // Update the items displayed in listBox1. this.DisplayAllItems(); }
' Update the items for listBox1 when item checked changed in gcRadioGroupBox1, Private Sub gcRadioGroupBox1_CheckedItemChanged(ByVal sender As Object, ByVal e As CheckedItemChangedEventArgs) If e.CurrentCheckedItem IsNot Nothing Then ' Use special styles for checked items. e.CurrentCheckedItem.ForeColor = Color.Red e.CurrentCheckedItem.Font = New Font(e.CurrentCheckedItem.Font, FontStyle.Bold) End If If e.OriginalCheckedItem IsNot Nothing Then ' Reset these properties will cause the properties to retreive their values from gcRadioGroupBox1. e.OriginalCheckedItem.ForeColor = Color.Empty e.OriginalCheckedItem.Font = Nothing End If ' Update the items displayed in listBox1. Me.DisplayAllItems() 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