I am creating a windows forms application, and I need a combobox containing items, that each opens another combobox and the user can specialize the selection.
An example:
I have 2 items in my combobox.
Danish words
English words
When the user selects English Words, then it opens another combobox, where the user can select an english word.
How do I create this kind of combobox?
**EDIT: It does not have to combobox, just something that achieves the same result
An image of the problem:
Try this code:
I’ve created two ComboBoxes one named language_CmbBx and one named words_CmbBx.
I set
words_CmbBx.Visible = false;This method is to get your mouseposition or the position of the selectedItem you wanted:
The only problem is that the ComboBox won’t stay open and I didn’t find a way yet to let it stay open.
As I already mentioned it is really difficult to achieve what you want using ComboBoxes, try to use ListBox instead:
Same code, better result!
You can download my VS2010-project here: http://www.abouchleih.de/projects/twocomboboxes.zip