How about changing the font color? That may do it.
> -----Original Message-----
> From: David Brennan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 22, 2000 2:44 PM
> To: Multiple recipients of list delphi
> Subject: [DUG]: Appearance of disabled controls
>
>
> I would like to change the behaviour of my inherited controls
> (such as edit
> boxes, combos, memos etc) so that when they are disabled the
> background is
> gray, but the text remains black.
>
> Setting the background to gray is easy - for example code like...
>
> procedure TDbbDBEdit.CMEnabledChanged(var Message: TMessage); Message
> CM_ENABLEDCHANGED;
> begin
> inherited;
> if Enabled then begin
> Color := clWindow;
> end
> else begin
> Color := clBtnFace;
> end;
> end;
>
> ... or similar will do it. However the edit box insists on
> drawing the text
> in dark gray, regardless of the Font Colour setting. Delphi
> doesn't seem to
> have any code for this so it must be default behaviour by windows for
> drawing disabled edit controls. Combo boxes etc have the same
> problem, which
> I would also like to get around.
>
> Is there any way around this behaviour. For example can it be
> changed by
> changing the parameters/style in CreateParams? If so what is the
> code/constants etc. Any other suggestions welcome.
>
> Thanks,
> David.
>
>
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"