What I want to do is to filter a combobox with another combobox, I mean, there's going to be a combobox with the following items: "Animals", "Letters", "Numbers" and "Colors".

There's going to be another combobox that if you choose animals (for example) will display the following items: "Farm animals", "Home animals".

Then another combobox will filter the content, I mean, if she chooses "Farm animals" that combobox will only display animals like: "Pig", "Cow", etc. If she chooses "Home animals" it will display only animals like: "Cat", "Dog", etc. And a picture of the choosen animal.

Is this somehow posible?

有帮助吗?

解决方案

Create an event listener using the ComboBox.SelectedIndexChanged Event so that when the index of the first combo box changes, the second combo box's values are determined.

http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged(v=vs.110).aspx

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top