粗略解決一下:
DoExit
begin
...
//jAmEs_, 04/07/2009, Begin
Invalidate;
//jAmEs_, 04/07/2009, End
end;
WMPaint
begin
...
//画文字
MArgins := GetTextMArgins;
//jAmEs_, 04/07/2009, Begin
if Focused then
Left := MArgins.X
else
case FAlignment of
taLeftJustify: Left := MArgins.X;
tArightJustify: Left := ClientWidth - TextWidth(S) - MArgins.X - 1;
else
Left := (ClientWidth - TextWidth(S)) div 2;
end;
//jAmEs_, 04/07/2009, End
TextRect(R, Left, MArgins.Y, S);
if (FLinkStyle <> lsNone) then //画按钮
...
end;
|