LCL: added TControlBorderSpacing.Control* properties (compatibility to Delphi's TMargins.Control*)

git-svn-id: trunk@50356 -
This commit is contained in:
ondrej 2015-11-17 10:38:42 +00:00
parent dbb4fc55c3
commit 7f3a0f94b2

View File

@ -693,6 +693,10 @@ type
FRight: TSpacingSize;
FTop: TSpacingSize;
FDefault: PControlBorderSpacingDefault;
function GetControlHeight: Integer;
function GetControlLeft: Integer;
function GetControlTop: Integer;
function GetControlWidth: Integer;
function IsAroundStored: boolean;
function IsBottomStored: boolean;
function IsInnerBorderStored: boolean;
@ -731,6 +735,10 @@ type
property InnerBorder: Integer read FInnerBorder write SetInnerBorder stored IsInnerBorderStored default 0;
property CellAlignHorizontal: TControlCellAlign read FCellAlignHorizontal write SetCellAlignHorizontal default ccaFill;
property CellAlignVertical: TControlCellAlign read FCellAlignVertical write SetCellAlignVertical default ccaFill;
property ControlLeft: Integer read GetControlLeft;
property ControlTop: Integer read GetControlTop;
property ControlWidth: Integer read GetControlWidth;
property ControlHeight: Integer read GetControlHeight;
end;
@ -3463,6 +3471,38 @@ begin
if Assigned(OnChange) then OnChange(Self);
end;
function TControlBorderSpacing.GetControlHeight: Integer;
begin
if FControl<>nil then
Result := FControl.Height+Around*2+Top+Bottom
else
Result := 0;
end;
function TControlBorderSpacing.GetControlLeft: Integer;
begin
if FControl<>nil then
Result := FControl.Left-Around-Left
else
Result := 0;
end;
function TControlBorderSpacing.GetControlTop: Integer;
begin
if FControl<>nil then
Result := FControl.Top-Around-Top
else
Result := 0;
end;
function TControlBorderSpacing.GetControlWidth: Integer;
begin
if FControl<>nil then
Result := FControl.Width+Around*2+Left+Right
else
Result := 0;
end;
{ TControlChildSizing }
procedure TControlChildSizing.SetEnlargeHorizontal(