ToolStripLabel - DisplayStyle是Image:Selection

时间:2015-11-10 21:15:40

标签: c# winforms

我的表单中有一个ToolStripButton,里面有ToolStripLabels& 2 ToolStripLabel

其中一个DisplayStyleImage设置为20 + 40

现在当焦点在ToolStrip中时,我可以在它之间导航 ToolStripButton&一个带左/右箭头键的ToolStripLabel。

但问题是,我无法使用DisplayStyle设置导航到ToolStripLabel 到图像。

没有迹象表明通过左/右箭头键选择了ToolStripLabel。

我可以选择将DisplayStyle设置为Image的ToolStripLabel吗?

1 个答案:

答案 0 :(得分:1)

一般情况下,如果您想让商品互动,我建议您使用ToolStripButton,但有关您的问题:

  

有没有办法可以选择DisplayStyle设置为的ToolStripLabel   图像?

是的。

  • 为了能够在商品之间移动,首先将TabStop的{​​{1}}属性设置为ToolStrip
  • 然后,对于您希望能够使用箭头键移动的每个true,请将IsLink属性设置为ToolStripLabel

要进行测试,您可以处理项目的true事件,当您使用箭头键移动项目时,请按Enter键以提高点击事件,例如显示一个消息框。