I am dynamically adding a ToolStripComboBox, and I need it to look like a regular combo box.
The tool strip version has the editable field and looks completely diff开发者_StackOverflow中文版erent. Is there a property (or multiple properties) I need to set to make it look and feel like the default combo box?
Set property FlatStyle
to FlatStyle.Standard
; this will give you the same dropdown arrow button.
Set property DropDownStyle
to ComboBoxStyle.DropDownList
; this will make it so that you can select but not edit.
In Visual Studio designer it would be setting the property to DropDownList:
精彩评论