Combobox Help

kite

New member
Joined
Nov 12, 2008
Messages
4
Programming Experience
Beginner
Hi,

I'm struggling to find a solution to part of my homework. What I need to do is to load up a textbox with filenames, which i've done.
Once the filenames are loaded, a combobox will list all of the filetypes present in the textbox, and from this I can filter out the files in the textbox.

Can anyone suggest any good Internet material with which I could solve this as I haven't had any luck so far.

Thanks
 
Loop through the files in the TextBox and call Path.GetExtension on each one. Add each one to a List(Of String) as you go, assuming that it's not already there. The Contains method of the List can tell you that. At the end, bind the List to the ComboBox by assigning to the control's DataSource property.
 
Back
Top