private void InitializeGcRadioGroupBox()
{
// Set header text by setting the Text property.
this.gcRadioGroupBox1.Text = "&Collapse All";
// Enable gcRadioGroupBox1 to expand or collapse.
this.gcRadioGroupBox1.HeaderType = HeaderType.ExpanderAndText;
// Create a top-line border radio group box.
this.gcRadioGroupBox1.GroupStyle = GroupStyle.TopLine;
// Initialize the layout of items by LayoutSettings.
this.gcRadioGroupBox1.LayoutSettings.LayoutMode = LayoutMode.Table;
this.gcRadioGroupBox1.LayoutSettings.Orientation = System.Windows.Forms.Orientation.Vertical;
this.gcRadioGroupBox1.LayoutSettings.RowCount = 3;
this.gcRadioGroupBox1.LayoutSettings.HorizontalAdjustment = GrapeCity.Win.Containers.LineAdjustment.Distributed;
this.gcRadioGroupBox1.LayoutSettings.VerticalAdjustment = GrapeCity.Win.Containers.LineAdjustment.Average;
this.gcRadioGroupBox1.CheckedItemChanged +=
new System.EventHandler<CheckedItemChangedEventArgs>(this.gcRadioGroupBox1_CheckedItemChanged);
this.gcRadioGroupBox1.HeaderStateChange +=
new System.EventHandler<HeaderStateChangeEventArgs>(this.gcRadioGroupBox1_HeaderStateChange);
// Create and add some items.
RadioButtonItem[] items = new RadioButtonItem[]
{
new RadioButtonItem("item1"),
new RadioButtonItem("item2"),
new RadioButtonItem("item3"),
new RadioButtonItem("item4"),
new RadioButtonItem("item5"),
};
this.gcRadioGroupBox1.Items.AddRange(items);
}
Private Sub InitializeGcRadioGroupBox()
' Set header text by setting the Text property.
Me.gcRadioGroupBox1.Text = "&Collapse All"
' Enable gcRadioGroupBox1 to expand or collapse.
Me.gcRadioGroupBox1.HeaderType = HeaderType.ExpanderAndText
' Create a top-line border radio group box.
Me.gcRadioGroupBox1.GroupStyle = GroupStyle.TopLine
' Initialize the layout of items by LayoutSettings.
Me.gcRadioGroupBox1.LayoutSettings.LayoutMode = LayoutMode.Table
Me.gcRadioGroupBox1.LayoutSettings.Orientation = System.Windows.Forms.Orientation.Vertical
Me.gcRadioGroupBox1.LayoutSettings.RowCount = 3
Me.gcRadioGroupBox1.LayoutSettings.HorizontalAdjustment = LineAdjustment.Distributed
Me.gcRadioGroupBox1.LayoutSettings.VerticalAdjustment = LineAdjustment.Average
AddHandler Me.gcRadioGroupBox1.CheckedItemChanged, AddressOf gcRadioGroupBox1_CheckedItemChanged
AddHandler Me.gcRadioGroupBox1.HeaderStateChange, AddressOf gcRadioGroupBox1_HeaderStateChange
' Create and add some items.
Dim items As RadioButtonItem() = New RadioButtonItem() {New RadioButtonItem("item1"), New RadioButtonItem("item2"), New RadioButtonItem("item3"), New RadioButtonItem("item4"), New RadioButtonItem("item5")}
Me.gcRadioGroupBox1.Items.AddRange(items)
End Sub