LCL, TCustomLabel default color is clNone, but it wont allow to store color:=clWindow which is the default for TControl

git-svn-id: trunk@11323 -
This commit is contained in:
jesus 2007-06-14 21:04:56 +00:00
parent 9c17ab1e6f
commit 183704f081
2 changed files with 9 additions and 0 deletions

View File

@ -319,6 +319,13 @@ begin
end;
end;
function TCustomLabel.ColorIsStored: boolean;
begin
Result:=(Color<>clNone);
if Result and ParentColor and (Parent<>nil) then
Result:=false;
end;
{-------------------------------------------------------------------------------
function TCustomLabel.AdjustFontForOptimalFill: Boolean;

View File

@ -1277,10 +1277,12 @@ type
function CalcFittingFontHeight(const TheText: string;
MaxWidth, MaxHeight: Integer; var FontHeight,
NeededWidth, NeededHeight: integer): Boolean;
function ColorIsStored: boolean; override;
function AdjustFontForOptimalFill: Boolean;
constructor Create(TheOwner: TComponent); override;
procedure Paint; override;
property AutoSize default True;
property Color default clNone;
end;