By default ComboBox and Button elements are not among those offered to add into a StatusStrip by WinForms designer (while DropDownButton and SplitButton are). Is there a way to add them there? As far as I've heard any control can be embedded there, but how?
Can I embed a ComboBox and a simple Button into a StatusStrip in WinForms?
10.5k views Asked by Ivan At
3
You can implement easily inheriting from
ToolStripControlHost
:After rebuilding your solution you will able to see the item even in the designer:
P.S.
this item will be usable also in
ContextMenuStrip
and inMenuStrip
.EDIT:
To set a custom icon use
ToolboxBitmapAttribute
.However, I noticed that actually there's a built-in combobox toolstrip item called
ToolStripComboBox
.It has just no designer visibility for the StatusStrip , but it can be easily added to a StatusStrip by code, or, if you prefer, you can extend it giving the complete visibility: