开发者

How to make a ToolStripComboBox look like a regular ComboBox

开发者 https://www.devze.com 2023-01-10 22:14 出处:网络
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. I

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:

How to make a ToolStripComboBox look like a regular ComboBox

0

精彩评论

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