Board index » delphi » How disabling a TEdit, making it become gray ?

How disabling a TEdit, making it become gray ?

Hello,

How disabling a TEdit, making it become gray ?
That's my question... (newbie)

Sylvain

Sent via Deja.com http://www.deja.com/
Before you buy.

 

Re:How disabling a TEdit, making it become gray ?


It is internal to windows. If you want different color, change
COLOR_GRAYTEXT color in Windows color scheme.
Quote
<sylvain_pa...@my-deja.com> wrote in message news:8mma9o$ti7$1@nnrp1.deja.com...
> Hello,

> How disabling a TEdit, making it become gray ?
> That's my question... (newbie)

> Sylvain

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Re:How disabling a TEdit, making it become gray ?


Disable:

Edit1.Enabled := False;

Read-only:

const
  EditColors = array[False..True] of TColor = (clBtnFace, clWindow);
begin
  Edit1.ReadOnly := True;
  Edit1.Color := EditColors[not Edit1.ReadOnly];
end;

<sylvain_pa...@my-deja.com> schreef in bericht
news:8mma9o$ti7$1@nnrp1.deja.com...

Quote
> Hello,

> How disabling a TEdit, making it become gray ?
> That's my question... (newbie)

> Sylvain

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Other Threads