473,466 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CheckedListBox.Items Read Only

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
2 6186
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raghu | last post by:
The HashTable object exposes IsReadOnly property from IDictionary interface (default is false). I have a hashtable that I want expose in a method call. However I do not want the user to remove or...
6
by: BBM | last post by:
I have an object that has a fairly complex construction sequence, so I have written a dedicated "factory" class that invokes the constructor of my object class (which does nothing but instantiate...
2
by: ChrisB | last post by:
Hello: I have created a collection that inherits from ReadOnlyCollectionBase and was wondering if there is a way to clear the items in the collection from within a method of the collection (of...
2
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine...
0
by: Marcin Podle¶ny | last post by:
Hi, I need some help with my CheckedListBox. I'd like to set some of CheckedListBox items to read only. I would also like to set these items to look different than other items (i.e. they could be...
6
by: Samuel M. Smith | last post by:
I have been playing around with a subclass of dict wrt a recipe for setting dict items using attribute syntax. The dict class has some read only attributes that generate an exception if I try to...
3
by: Mythran | last post by:
http://msdn2.microsoft.com/en-US/library/ms229057(VS.80).aspx * Do not assign instances of mutable types to read-only fields. I would have to disagree with this "Field Design" guidelines...to...
2
by: Bobby | last post by:
I am using access 2003. I have a form which is based on a simple query. Previously I could edit the data on the form, but now it is read only. The form has not changed and neither has the query....
11
beacon
by: beacon | last post by:
Hi everybody, I created a database that links one table from an ODBC data source. I saved my password and UID to the data source so neither myself nor anyone else would have to login each time...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.