Skip to main content

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
We have done this by just modifying the control's "COLOR" property. Perhaps there are other ways to do this, but this is how we accomplished it and it's worked fine.

Rob

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
I see that works, but I dont want to change 500 programs
I see there is a config file entry DISABLED_CONTROL_COLOR but this only affects console programs and not windows programs, any other ideas how to do a global change without updating all the sources

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
This probably doesn't help either, but another thing that you can do is make the control read-only instead of disabled. Then the foreground stays black with a grayed background. The downside is that you can still click in the control and it will keep the focus.

Robstan, what COLOR value do you use? I tried playing with a few and couldn't come up with one that did what I want (black text on grayed background - basically what the read-only property does, but allow the field to be disabled also). I thought COLOR 1 would have done it, but it changes the background to white and leaves the foreground gray.

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
Joe,

We allow our users to choose the font using W$FONT. We save that output and then use it for our modify of the control.

Rob

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
Originally posted by JoeD
This probably doesn't help either, but another thing that you can do is make the control read-only instead of disabled. Then the foreground stays black with a grayed background. The downside is that you can still click in the control and it will keep the focus.


We do this aswell, but on top of what JoeD says above, we also set the NOTAB property to TRUE.


Shaun

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
I have researched this one extensively and concluded that it is (almost) impossible, including sending custom messages to the control. The problem is AcuCorp has not implemented WM_CTLCOLOREDIT message handler, which could be considered a bug or a missing feature, depending on how you look at it.

The problem is that the entry-field edit controls are subclassed and the subclassing routines set the color to a hard coded value at render time.

Re-sublcassing theoretically possible. I got frustrated and gave up, though.

no-tab readonly is the closest thing, but the kicker is there is no way to query this in code (you can't inquire styles). Therefor, it you can't really keep before/after procedures from executing (thanks to the mouse) by checking the read-only state..

The only other option is to use an activex text control, but IMO there is no way to make them data-bound. So it's lose-lose.

AcuCorp, please fix..this is very annoying!

Merlin

[Migrated content. Thread originally posted on 03 August 2004]

I have controls and entry fields that are disabled, but they show
as light grey on the screen and it is difficult to read , is it possible
to change the color of disabled controls
We do process WM_CTLCOLOREDIT....

If we did not, I am sure we would have gotten many funny effects. There might be a special case that slips through though.

If, as it may seem, there is a chance the runtime doesn't behave as expected I suggest you forward it to Tech support for evaluation of whether it is a bug or if it may be a sound enhancement request.