I've created derivative TEdits which respond to the CM_ENABLEDCHANGED
message where I change the color to reflect it's enabled state.

Use:

    procedure CMEnabledChanged(var Message: TMessage); message
CM_ENABLEDCHANGED;

If you need more help, let me know.

Something like

TMyEdit = class(TEdit)
 procedure CMEnabledChanged(var Message: TMessage); message
CM_ENABLEDCHANGED;
end;

TMyEdit.CMEnabledChanged(var Message: TMessage);
begin
 inherited;
 if Enabled
   then Color := clWindow
   else Color := clBtnFace;
end;

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Alfred Vink
Sent: Thursday, May 26, 2005 9:02 AM
To: 'Delphi-Talk Discussion List'
Subject: Disabling Tedit XP style



Hi Guys,

When disabling a Tedit on a form which also holds a XPManifest, the Tedit
does not completely grey-out, only the text, the lightblue outline remains.
Is there a simple way to make this outline also grey when disabled ?

Currently when there is no text in the Tedit it is not obvious from the
start it is disabled.

Alfred



__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk


__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to