Windows.Forms button with drop-down menu

后端 未结 9 2088
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 14:31

I\'m developing simple C# application using Windows.Forms on .NET. I need some button that will show a drop-down menu with subcategories - much like ToolStripMenu, but the b

9条回答
  •  时光取名叫无心
    2020-12-02 14:59

    The simplest option would be to use the ToolStripDropDownButton in an undocked ToolStrip that only shows the single button. Then you can add sub-items to it, etc. To do this: - drag a Toolstrip onto your control/form - use the layout helper to add a DropDownButton - set GripStyle to Hidden - set Dock to None

    The result is a standalone toolbar-style button that supports the drop-down behavior that you described.

提交回复
热议问题