LCL: Show name of control contained in TFlowPanelControl in nodes of object tree.

git-svn-id: trunk@59113 -
This commit is contained in:
wp 2018-09-21 10:47:41 +00:00
parent 652179026e
commit bba151118e
2 changed files with 9 additions and 0 deletions

View File

@ -1175,6 +1175,7 @@ type
procedure SetControl(const aControl: TControl);
procedure SetWrapAfter(const AWrapAfter: TWrapAfter);
protected
function GetDisplayName: String; override;
procedure SetIndex(Value: Integer); override;
procedure AssignTo(Dest: TPersistent); override;
function FPCollection: TFlowPanelControlList;

View File

@ -118,6 +118,14 @@ begin
Result := FPCollection.FPOwner;
end;
function TFlowPanelControl.GetDisplayName: String;
begin
if (FControl is TComponent) then
Result := '[' + TComponent(FControl).Name + ']'
else
Result := inherited;
end;
procedure TFlowPanelControl.SetControl(const aControl: TControl);
begin
if FControl = aControl then Exit;