CheckedListBox.Items Read Only

  • Thread starter Thread starter Corey Scheich
  • Start date Start date
C

Corey Scheich

Coming from mostly VBA to VB.NET so bare with me.

I am creating a form with a CheckedListBox. I want to populate the listbox
as the user types in a value. I tried to use

CheckedListbox.Items = SomeCollection

but I am getting a compile error saying that "Items" is a 'Read Only'
Property. How should I get around this.

Corey Scheich
 
* "Corey Scheich said:
I am creating a form with a CheckedListBox. I want to populate the listbox
as the user types in a value. I tried to use

CheckedListbox.Items = SomeCollection

\\\
Dim Items As New ArrayList()
Items.AddRange(New String() {"Foo", "Bar", "goo"})
Me.CheckedListBox1.Items.Clear()
Me.CheckedListBox1.Items.AddRange(Items.ToArray())
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top