本文介绍了改变日食menuitem颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我的插件动态更改一些 menuitems 颜色,例如黄色。
是可能吗?更多细节:

说我想改变 file-> import menuitem 为黄色,哪个类负责?

为了简单起见,如果我有SWT窗口,计算器与其中的File菜单,如何更改 File-> exit menuItem 黄色当我按下或在这个计算器窗口中做某事?

提前感谢

解决方案

任何与菜单相关的颜色设置都是依赖于操作系统的,因为SWT是基于本地GUI实现(如请求非活动颜色:

这个想添加颜色到弹出菜单,最好的解决方案是...









I would like to change some menuitems color ,for example yellow, dynamically with my plugin.is it possible?

More details:
Lets say I wanna change the file->import menuitem to yellow, which class is responsible for that?
For simpleness, if I got SWT window, calculater with File menu in it, how to change the File->exit menuItem to yellow when I press or do something in this calculator windows??
thanks in advance

解决方案

Any menu-related color settings are OS-dependent, since SWT is based on native GUI implementation (as Kos alludes to in the comment).

This thread asks for the "inactive color":

This thread want to add color to a popup menu, and the best solution is...

这篇关于改变日食menuitem颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 15:40