Control inside control with Winforms
Is 开发者_如何学Goit possible to put a combo box inside a list box? I'd like to create a list (inside the list box) with each entry having a combo box next to it.
No.
Instead, you should use a DataGridView with a ComboBox column.
This may not be the best solution for you since it's already implemented in a DataGridView - but to answer your question, yes, it is possible.
If the listbox is named ListBox1 and the ComboBox is named ComboBox1:
ListBox1.Controls.Add(ComboBox1)
You can add new comboboxes and position them just like in a panel.
精彩评论