public void CreateMyGcCheckedGroupBox()
{
GcCheckedGroupBox gcCheckedGroupBox1 = new GcCheckedGroupBox();
gcCheckedGroupBox1.Location = new Point(15, 15);
gcCheckedGroupBox1.Text = "MyGcCheckedGroupBox";
// Create an item.
CheckBoxItem item = new CheckBoxItem();
// Set the Text of CheckBoxItem.
item.Text = "MyCheckBoxItem";
// Set a new Font from the existing font.
item.Font = new Font(item.Font, FontStyle.Bold);
// Set the BackColor and ForeColor properties for CheckBoxItem.
item.BackColor = Color.LightGreen;
item.ForeColor = Color.LightPink;
// Disable the item.
item.Enabled = false;
gcCheckedGroupBox1.LayoutSettings.LayoutMode = LayoutMode.Absolute;
// Set the location of the item.
item.Location = new Point(15, 15);
// Clone an item, modify its location and change its Enabled to true to enable the UI interaction.
CheckBoxItem clonedItem = item.Clone() as CheckBoxItem;
clonedItem.Location = new Point(15, 40);
clonedItem.Enabled = true;
gcCheckedGroupBox1.Items.Add(item);
gcCheckedGroupBox1.Items.Add(clonedItem);
this.Controls.Add(gcCheckedGroupBox1);
}
Public Sub CreateMyGcCheckedGroupBox()
Dim gcCheckedGroupBox1 As New GcCheckedGroupBox()
gcCheckedGroupBox1.Location = New Point(15, 15)
gcCheckedGroupBox1.Text = "MyGcCheckedGroupBox"
' Create an item.
Dim item As New CheckBoxItem()
' Set the Text of CheckBoxItem.
item.Text = "MyCheckBoxItem"
' Set a new Font from the existing font.
item.Font = New Font(item.Font, FontStyle.Bold)
' Set the BackColor and ForeColor properties for CheckBoxItem.
item.BackColor = Color.LightGreen
item.ForeColor = Color.LightPink
' Disable the item.
item.Enabled = False
gcCheckedGroupBox1.LayoutSettings.LayoutMode = LayoutMode.Absolute
' Set the location of the item.
item.Location = New Point(15, 15)
' Clone an item, modify its location and change its Enabled to true to enable the UI interaction.
Dim clonedItem As CheckBoxItem = TryCast(item.Clone(), CheckBoxItem)
clonedItem.Location = New Point(15, 40)
clonedItem.Enabled = True
gcCheckedGroupBox1.Items.Add(item)
gcCheckedGroupBox1.Items.Add(clonedItem)
Me.Controls.Add(gcCheckedGroupBox1)
End Sub