>
> Then you could just let Enable messages through. That seems to work, ie.
>
> procedure TEditX.WMEnable(var Message: TWMEnable);
> begin
> if Message.Enabled then inherited;
> end;
>
... or alternatively:
procedure TDbbEdit.CreateParams(var Params: TCreateParams);
begin
inherited;
with Params do begin
Style := Style and not WS_DISABLED; // Never create window disabled.
end;
end;
procedure TDbbEdit.CreateWnd;
begin
inherited;
if not Enabled then begin
Perform(CM_ENABLEDCHANGED, 0, 0); // Trigger code to set window enabled.
end;
end;
That is make sure the edit box is always created enabled (therefore with
normal text), then after creation trigger CM_EnabledChanged to get windows
to update it to disabled (but without affecting painting). This is in fact
what I am doing.
David.
DB Solutions Ltd.
---------------------------------------------------------------------------
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"