自己写的UserControl 写了个属性
Public ReadOnly Property ComboBoxItems As GrapeCity.Win.Editors.ListItemCollection
Get
Return cmbComboBox.Items
End Get
End Property
这样发现ComboBoxItems 属性中的值保存不了
这个中的值,代码关闭后就没了
看到gcComboBox中添加items时,会自动生成如下代码
Dim ListItem1 As GrapeCity.Win.Editors.ListItem = New GrapeCity.Win.Editors.ListItem()
Dim SubItem1 As GrapeCity.Win.Editors.SubItem = New GrapeCity.Win.Editors.SubItem()
SubItem1.Value = "111111"
ListItem1.SubItems.AddRange(New GrapeCity.Win.Editors.SubItem() {SubItem1})
Me.GcComboBox1.Items.AddRange(New GrapeCity.Win.Editors.ListItem() {ListItem1})