-
July 26th, 2009, 04:21 PM
#1
Using Listbox items outside the form
On a form there is a listbox containing serveral items (single column). These items are added to dynamically. No datasource is used.
I want to create a class that needs access to these items. I was thinking something in the line of:
class Test
private List<string> testList
public void setTestList (List<string> list)
{
testList = list;
}
....
But I can't seem to pass the Listbox items as a list to the setTestList() method.
Is there a way to pass the Listbox items as a list?
Or do I need another approach?
Setting the Listbox modifier to public is not really an option.
Any information is welcome.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|