' Please use the following namespace
' Imports System.Windows.Forms;
' Imports GrapeCity.Win.Editors;
Public Sub SetItemsSettings()
' Creates the GcMaskedComboBox control.
Dim gcMaskedComboBox1 As New GcMaskedComboBox()
' Creates the ListListColumns.
Dim listColumn1 As New ListColumn()
Dim listColumn2 As New ListColumn()
' Createst eh ListItems and SubItems.
Dim listItem1 As New ListItem()
Dim subItem1 As New SubItem()
Dim subItem2 As New SubItem()
Dim listItem2 As New ListItem()
Dim subItem3 As New SubItem()
Dim subItem4 As New SubItem()
Dim listItem3 As New ListItem()
Dim subItem5 As New SubItem()
Dim subItem6 As New SubItem()
Dim listItem4 As New ListItem()
Dim subItem7 As New SubItem()
Dim subItem8 As New SubItem()
Dim listItem5 As New ListItem()
Dim subItem9 As New SubItem()
Dim subItem10 As New SubItem()
' Sets the ListItems' settings.
subItem1.Value = "111-1111-1111"
subItem2.Value = "AAAAA"
listItem1.SubItems.AddRange(New SubItem() {subItem1, subItem2})
subItem3.Value = "222-2222-2222"
subItem4.Value = "BBBBB"
listItem2.SubItems.AddRange(New SubItem() {subItem3, subItem4})
subItem5.Value = "333-3333-3333"
subItem6.Value = "CCCCC"
listItem3.SubItems.AddRange(New SubItem() {subItem5, subItem6})
subItem7.Value = "444-4444-4444"
subItem8.Value = "DDDDD"
listItem4.SubItems.AddRange(New SubItem() {subItem7, subItem8})
subItem9.Value = "555-5555-5555"
subItem10.Value = "EEEEE"
listItem5.SubItems.AddRange(New SubItem() {subItem9, subItem10})
' Adds the columns.
gcMaskedComboBox1.ListColumns.AddRange(New ListColumn() {listColumn1, listColumn2})
' Adds the items.
gcMaskedComboBox1.Items.AddRange(New ListItem() {listItem1, listItem2, listItem3, listItem4, listItem5})
End Sub
// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
public void SetItemsSettings()
{
// Creates the GcMaskedComboBox control.
GcMaskedComboBox gcMaskedComboBox1 = new GcMaskedComboBox();
// Creates the ListColumns.
ListColumn listColumn1 = new ListColumn();
ListColumn listColumn2 = new ListColumn();
// Creates the ListItems and SubItems.
ListItem listItem1 = new ListItem();
SubItem subItem1 = new SubItem();
SubItem subItem2 = new SubItem();
ListItem listItem2 = new ListItem();
SubItem subItem3 = new SubItem();
SubItem subItem4 = new SubItem();
ListItem listItem3 = new ListItem();
SubItem subItem5 = new SubItem();
SubItem subItem6 = new SubItem();
ListItem listItem4 = new ListItem();
SubItem subItem7 = new SubItem();
SubItem subItem8 = new SubItem();
ListItem listItem5 = new ListItem();
SubItem subItem9 = new SubItem();
SubItem subItem10 = new SubItem();
// Sets the ListItems' settings.
subItem1.Value = "111-1111-1111";
subItem2.Value = "AAAAA";
listItem1.SubItems.AddRange(new SubItem[] {
subItem1,
subItem2});
subItem3.Value = "222-2222-2222";
subItem4.Value = "BBBBB";
listItem2.SubItems.AddRange(new SubItem[] {
subItem3,
subItem4});
subItem5.Value = "333-3333-3333";
subItem6.Value = "CCCCC";
listItem3.SubItems.AddRange(new SubItem[] {
subItem5,
subItem6});
subItem7.Value = "444-4444-4444";
subItem8.Value = "DDDDD";
listItem4.SubItems.AddRange(new SubItem[] {
subItem7,
subItem8});
subItem9.Value = "555-5555-5555";
subItem10.Value = "EEEEE";
listItem5.SubItems.AddRange(new SubItem[] {
subItem9,
subItem10});
// Adds the columns.
gcMaskedComboBox1.ListColumns.AddRange(new ListColumn[] { listColumn1, listColumn2 });
// Adds the items.
gcMaskedComboBox1.Items.AddRange(new ListItem[] {
listItem1,
listItem2,
listItem3,
listItem4,
listItem5});
}