如果单击菜单项,如何使菜单项看起来不同
问题描述:
伙计们,我在C#表单上有一个菜单栏,并在其上的每个按钮上添加了图片,它会根据您所按的按钮更改我的页面.我希望按下的按钮在视觉上发生变化,以便您知道自己在哪个页面上.谁能帮忙. tnx
hay guys, i have a menustrip on my c# form and added pictures to each button on it, it changes my page depending what button u press. i want the pressed button to change visually like so you know what page you are on. can anyone help. tnx
答
您可以使用ToolStripRenderer
使MenuStrip看起来与众不同.请参阅这些有用的文章.
在C#中自定义Visual Studio 2008风格的MenuStrip和ToolStrip渲染器 [ ^ ]
针对ToolStrip,MenuStrip和StatusStrip控件的自定义渲染 [ ^ ]
You can useToolStripRenderer
to make a MenuStrip look different. See these helpful articles.
Custom VisualStudio 2008-style MenuStrip and ToolStrip Renderer in C#[^]
Custom Rendering for the ToolStrip, MenuStrip, and StatusStrip controls[^]