How do I filter items in a listbox using a combobox using c# and windows forms?
the listbox contains files and the combobox needs to filter them by their extension
Please help I’m new to programming
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is almost an exact duplicate from your last question. The same answer applies.
On the selected index changed event of the combo box, I’d add the items to your listbox based off of the filter selected from your combobox. You can use System.IO.DirectoryInfo to filter your directory given a file extension.
Filtering a texbox with a combobox