By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

CheckedListBox.Items Read Only

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Corey Scheich" <cE**************@garlockequiP.com> scripsit:
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())
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<ue**************@TK2MSFTNGP09.phx.gbl>...
* "Corey Scheich" <cE**************@garlockequiP.com> scripsit:
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())
///

Worked great I appreciate it.

Corey
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.