【问题标题】:StatusStrip - Add a button without the dropdown arrow to the right of itStatusStrip - 在右侧添加一个不带下拉箭头的按钮
【发布时间】:2014-08-22 17:15:34
【问题描述】:

我知道有一个 ToolStripSplitButton...

...但是有没有办法使用该按钮对象而没有右侧的下拉箭头。最终只得到一个按钮图像?

【问题讨论】:

    标签: c# statusstrip


    【解决方案1】:

    找到它...将 DropdownButtonWidth 设置为 0...

    【讨论】:

    • 我有时会发誓...我盯着某样东西看了 10 分钟却看不到它...我在堆栈上查找并找不到快速简单的答案...所以我问它并花 10 分钟问它... 完成后我回头看另一台显示器,它打了我一巴掌... 然后我去回答我自己的问题以帮助其他人... 30 分钟后我继续编码...... Gezz......
    • 我找不到这个属性,但是将“ShowDropDownArrow”设置为 false 提供了相同的效果。
    • ToolStripSplitButton 的DropdownButtonWidth 和toolStripDropDownButton 的 ShowDropDownArrow
    【解决方案2】:

    使用 ToolStripDropDownButton wo 下拉项。

    设置 ToolStripDropDownButton.ShowDropDownArrow = false;

    (我尝试了一种方法“将 DropdownButtonWidth 设置为 0”,但对我来说继续看到黑色三角形的几个像素)

    【讨论】:

    • 很奇怪。它对我来说很完美。我一直在 c#v4 中工作,也许这是新框架中的新东西?
    • 我在 4.5.1 中工作,我也看到了像素。但是使用 DropDownButton 效果很好。