LCL/TLabeledEdit: Allow to change TLabeledEdit.EditLabel.Layout, publush TLabeledEdit.EditLabel.Alignment (see https://forum.lazarus.freepascal.org/index.php/topic,65452.msg498672.html)

This commit is contained in:
wp_xyz 2023-12-05 12:18:27 +01:00
parent ddbf9be326
commit ca219eca4b
3 changed files with 4 additions and 3 deletions

View File

@ -973,6 +973,7 @@ type
constructor Create(TheOwner: TComponent); override;
property FocusControl;
published
property Alignment;
property AnchorSideLeft stored False;
property AnchorSideTop stored False;
property AnchorSideRight stored False;
@ -991,7 +992,7 @@ type
property PopupMenu;
property ShowAccelChar;
property ShowHint;
property Layout;
property Layout default tlCenter;
property WordWrap;
property OnClick;
property OnDblClick;

View File

@ -19,6 +19,8 @@ constructor TBoundLabel.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
Name := 'SubLabel';
Alignment := taLeftJustify;
Layout := tlCenter;
SetSubComponent(True);
if Assigned(TheOwner) then
Caption := TheOwner.Name;

View File

@ -77,12 +77,10 @@ begin
lpLeft :
begin
FEditLabel.AnchorToCompanion(akRight,FLabelSpacing,Self);
FEditLabel.AnchorVerticalCenterTo(Self);
end;
lpRight:
begin
FEditLabel.AnchorToCompanion(akLeft,FLabelSpacing,Self);
FEditLabel.AnchorVerticalCenterTo(Self);
end;
end;
if Parent<>nil then