禁用时的cf 2.0组合框文字颜色 [英] cf 2.0 combobox text color when disabled

查看:103
本文介绍了禁用时的cf 2.0组合框文字颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试更改组合框的文本的颜色(启用= false时,但是始终是灰色的).

我正在将vs2008,C#,紧凑型框架2.0用于Pocketpc

解决方案

它是灰色的,因为这是禁用项目的标准.通过遵守标准,用户可以立即识别当前不可用的控件.

如果要修改此属性,则建议您尝试使用.ReadOnly属性而不是.Enabled属性.这将给您带来更多的自由,尽管我是否会记住是否可以允许您想要的内容也没有问题.


组合框上没有只读的内容.与所有者抽奖工作非常困难.并且更改组合的前景色不会影响文本的禁用颜色.我的用户真的不在乎别人对标准的想法.他们需要能够阅读文本.控件彩色背景上的黑色文字更加清晰易读.我们所有其他自定义控件都强制执行此标准.组合框与所有其他控件完全不同.这里的标准在哪里? :confused:为什么这么难?


hi
i''m trying to change the colour of the text in the combobox when it''s enabled = false, but it''s alway gray.

i am using vs2008, c#, compact framework 2.0 for pocketpc

can you help me or give me some suggest?

解决方案

It''s gray because that is the standard for disabled items. By adhering to the standard users get to instantly recognize controls that are not currently useable.

If you want to modify this then I would suggest that you try the .ReadOnly property instead of the .Enabled one. that will give you a bit more freedom, although I cannot remember off the top of my head if it will allow what you want.


There is no readonly on a combobox. Working with the owner draw is very difficult. And changing the forecolor of the combo does not impact the disabled color of the text. My users really don''t care about someone else''s idea of a standard. They need to be able to read the text. Black text on a control colored background is much more legible. ALL of our other custom controls enforce this standard. The combo box is completely different from all the other controls. Where is the standard here? :confused: Why is this so difficult?


这篇关于禁用时的cf 2.0组合框文字颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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