July 26th, 2009, 04:21 PM
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:
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
Click Here to Expand Forum to Full Width