开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜