简体   繁体   English

带有每个状态的图像的工具条按钮

[英]toolstripbutton with images for each state

I have in my app a ToolSrip with some ToolStripButtons. 我的应用程序中有一个带有一些ToolStripButtons的ToolSrip。 I wish add not only the basic image, but an image for the hover state and another for the clicked state, and if possible, remove the orange background when the button is hovered by the mouse... it's possible? 我希望不仅添加基本图像,还添加用于悬停状态的图像和用于单击状态的图像,并且如果可能的话,请在鼠标悬停按钮时删除橙色背景...可以吗? thanks in advance! 提前致谢!

If you look at the events of the button you can see various events including. 如果查看按钮的事件,则可以看到各种事件,包括。 This isnt working code its just a sample from my head but look at the link. 这不是工作代码,只是我脑海中的一个示例,但请看一下链接。

private void Button1_OnMouseHover
{
   BackGroundImage = "test.png";
}

http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripbutton.aspx http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripbutton.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM