K
Kevin
I know that to add and check items the following is used
CheckedListBox1.Items.AddRange(New Object() {"One", "Two"})
CheckedListBox1.SetItemChecked(0, True)
What I would like is to add a method to the Items property that would allow
me to add the display value and the value for checked or unchecked. below I
slapped something together which works off the base control but rather have
my method work on the Items property of the custom checkedlistebox. Any
thoughts?
Public Class ksgCheckedListBox
Inherits Windows.Forms.CheckedListBox
Public Sub AddValueBoolean(ByVal DisplayValue As String, ByVal Checked
As Boolean)
Me.Items.Add(DisplayValue)
Me.SetItemChecked(Me.Items.Count - 1, Checked)
End Sub
End Class
CheckedListBox1.Items.AddRange(New Object() {"One", "Two"})
CheckedListBox1.SetItemChecked(0, True)
What I would like is to add a method to the Items property that would allow
me to add the display value and the value for checked or unchecked. below I
slapped something together which works off the base control but rather have
my method work on the Items property of the custom checkedlistebox. Any
thoughts?
Public Class ksgCheckedListBox
Inherits Windows.Forms.CheckedListBox
Public Sub AddValueBoolean(ByVal DisplayValue As String, ByVal Checked
As Boolean)
Me.Items.Add(DisplayValue)
Me.SetItemChecked(Me.Items.Count - 1, Checked)
End Sub
End Class