mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 15:20:27 +02:00
LCL: added TControlBorderSpacing.Control* properties (compatibility to Delphi's TMargins.Control*)
git-svn-id: trunk@50356 -
This commit is contained in:
parent
dbb4fc55c3
commit
7f3a0f94b2
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user