如何更改禁用的ToolStripItem文本的默认灰色颜色 [英] How to change the default grey color of disabled ToolStripItem Text

查看:79
本文介绍了如何更改禁用的ToolStripItem文本的默认灰色颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当禁用ToolStripItem(或Control)时,除其他UI更改外,它的Text变灰(每个人都知道),而对ForeColor的更改将被忽略.
我非常希望能够更改ForeColor,即使在Enabled = false时也是如此.
谢谢.
Toli

When a ToolStripItem (or a Control) is disabled, among other UI changes is that it''s Text is greyed out (everybody knows that) and changes to ForeColor are ignored.
I would very much like to be able to change the ForeColor, even when Enabled = false.
Thank you.
Toli

推荐答案

您尝试使用位于 ^ ]?
Did you try to use the example located here[^]?


您需要覆盖一个负责绘制工具栏项目的事件.我不知道是哪一个,但是您应该不难发现它.
You need to override one the event responsible for painting the toolstrip items. I don''t know precisely which one, but it shouldn''t be that hard for you to figure it out.


这篇关于如何更改禁用的ToolStripItem文本的默认灰色颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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