mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 21:42:41 +02:00
IDE: component list: update buttons on becoming visible
git-svn-id: trunk@46588 -
This commit is contained in:
parent
c97db23fe2
commit
4f5cdcb8ff
@ -80,6 +80,8 @@ type
|
||||
procedure ComponentWasAdded;
|
||||
procedure FindAllLazarusComponents;
|
||||
procedure UpdateButtonState;
|
||||
protected
|
||||
procedure UpdateShowing; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -137,12 +139,10 @@ begin
|
||||
ParentParent := Nil;
|
||||
if Assigned(Parent) then
|
||||
ParentParent := Parent.Parent;
|
||||
DebugLn(['*** TComponentListForm.FormShow, Parent=', Parent, ', Parent.Parent=', ParentParent]);
|
||||
//DebugLn(['*** TComponentListForm.FormShow, Parent=', Parent, ', Parent.Parent=', ParentParent]);
|
||||
ButtonPanel.Visible := ParentParent=Nil;
|
||||
if ButtonPanel.Visible then begin
|
||||
PageControl.AnchorSideBottom.Side := asrTop;
|
||||
UpdateButtonState;
|
||||
end
|
||||
if ButtonPanel.Visible then
|
||||
PageControl.AnchorSideBottom.Side := asrTop
|
||||
else
|
||||
PageControl.AnchorSideBottom.Side := asrBottom;
|
||||
end;
|
||||
@ -208,6 +208,13 @@ begin
|
||||
ButtonPanel.OKButton.Enabled := Assigned(GetSelectedComponent);
|
||||
end;
|
||||
|
||||
procedure TComponentListForm.UpdateShowing;
|
||||
begin
|
||||
if ButtonPanel.Visible then
|
||||
UpdateButtonState;
|
||||
inherited UpdateShowing;
|
||||
end;
|
||||
|
||||
procedure TComponentListForm.UpdateComponentSelection(Sender: TObject);
|
||||
// Fill the three tabsheets.
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user