如何保留菜单推入状态 [英] How to Preserve the menu pushed state

查看:95
本文介绍了如何保留菜单推入状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生,我是印度的Vinay.

我在项目用户界面中创建了Office 2007之类的界面时遇到问题.
每件事都与Office 2007相似,但不使用任何控件或功能区控件的绘画事件.我已经开始从头开始创建Office 2007控件,但是我的菜单按钮无法保留其推入状态,因为它是通过Microsoft Office 2007菜单按钮被推入而保留的,棕色按钮与菜单项一起显示.

我的界面的选项卡也是如此.

我该如何在C#和GDI中执行此操作,请提供一些建议或代码.谢谢

解决方案

如果实际上按照您所说的做而没有使用任何控件的paint事件,那么您做得很好.
不幸的是,我不知道有什么方法可以做而不覆盖/使用paint事件.


您可能需要构建另一个控件来模拟此"push"事件.您可以使用某种ToggleButton.你应该做的事情".


Hello Sir, I am Vinay From India.

I have a problem in my project user interface that i have created office 2007 like interface.
Every thing is similar to office 2007 without using paint event of any control nor ribbon controls. I have started creating office 2007 controls from scratch but my menu button doesn''t able to preserve its pushed state as it is preserved with microsoft office 2007 menu button is pushed, brown colored button is display with the menu items.

Same case is with the tabs of my interface.

how can i do this in c# and gdi please provide me some suggestions or with the code. Thank you

解决方案

If you have in fact done as you say without using the paint event of any of the controls, then you have done very well.

Unfortunately I do not know of any way to do what you want without overriding/using the paint event.


You may need to build another control that simulates this "push" event. You could use some sort of a ToggleButton.


Without seeing your code, we can''t possibly help you beyond stating the obvious - "you''re doing something wrong, or not doing something yo should be doing".


这篇关于如何保留菜单推入状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆