Question How to Add Items to a Checked List Box

mecablaze

Member
Joined
Oct 4, 2008
Messages
5
Programming Experience
1-3
I have a program that so far downloads an XML file, parses it, stores it in an ArrayList and then reads the ArrayList to add items to a Checked List Box, which is on a different form from where the ArrayLists are made and stored as public class variables.

After I construct the ArrayLists I used the following bit of

Code:
testForm.testList.Items.Add("Test String", True)
The code runs properly and can be accessed again using
Code:
testForm.testList.Items(<index>)
When I hide the current form and show "testForm" (the form holding the Checked List Box) none of the items I've added show up. Any ideas?
 
Last edited:

mecablaze

Member
Joined
Oct 4, 2008
Messages
5
Programming Experience
1-3
Another note, all this code about downloading XML, parsing it, and adding items into a checked list box is done inside a background worker. I'm not sure if that will make a different.
 

mecablaze

Member
Joined
Oct 4, 2008
Messages
5
Programming Experience
1-3
I fixed the problem. I was trying to add items to a form from a background worker. I added the statement to the report progress function of the background worker and it worked great!
 
Top Bottom