GrapeCity.Win.Containers 名前空間 > GcRadioGroupBox クラス : Items プロパティ |
Public ReadOnly Property Items As RadioButtonItemCollection
public RadioButtonItemCollection Items {get;}
// Fill listBox1 with all the items in gcRadioGroupBox1. private void DisplayAllItems() { // Display all the items of gcRadioGroupBox1 in list box. this.listBox1.Items.Clear(); RadioButtonItemCollection items = this.gcRadioGroupBox1.Items; foreach (RadioButtonItem item in items) { int index = this.listBox1.Items.Add( item.Text + " index: " + items.IndexOf(item).ToString() + " checked state: " + item.Checked); } // Select the corresponding item in listBox1. this.listBox1.SelectedIndex = this.gcRadioGroupBox1.CheckedIndex; }
' Fill listBox1 with all the items in gcRadioGroupBox1. Private Sub DisplayAllItems() ' Display all the items of gcRadioGroupBox1 in list box. Me.listBox1.Items.Clear() Dim items As RadioButtonItemCollection = Me.gcRadioGroupBox1.Items For Each item As RadioButtonItem In items Dim index As Integer = Me.listBox1.Items.Add(item.Text + " index: " + items.IndexOf(item).ToString() + " checked state: " + item.Checked.ToString()) Next ' Select the corresponding item in listBox1. Me.listBox1.SelectedIndex = Me.gcRadioGroupBox1.CheckedIndex 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