mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:19:29 +02:00
IDE: hide the "Add and close" button in ComponentList properly when Anchored.
git-svn-id: trunk@41928 -
This commit is contained in:
parent
abfeceefbf
commit
266d4338c6
@ -1,13 +1,12 @@
|
|||||||
object ComponentListForm: TComponentListForm
|
object ComponentListForm: TComponentListForm
|
||||||
Left = 720
|
Left = 368
|
||||||
Height = 467
|
Height = 467
|
||||||
Top = 39
|
Top = 94
|
||||||
Width = 300
|
Width = 300
|
||||||
Caption = 'Components'
|
Caption = 'Components'
|
||||||
ClientHeight = 467
|
ClientHeight = 467
|
||||||
ClientWidth = 300
|
ClientWidth = 300
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnActivate = FormActivate
|
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnKeyDown = FormKeyDown
|
OnKeyDown = FormKeyDown
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
@ -21,8 +20,8 @@ object ComponentListForm: TComponentListForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel
|
AnchorSideBottom.Control = ButtonPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 403
|
Height = 409
|
||||||
Top = 29
|
Top = 28
|
||||||
Width = 298
|
Width = 298
|
||||||
ActivePage = TabSheetList
|
ActivePage = TabSheetList
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -32,22 +31,22 @@ object ComponentListForm: TComponentListForm
|
|||||||
OnChange = PageControlChange
|
OnChange = PageControlChange
|
||||||
object TabSheetList: TTabSheet
|
object TabSheetList: TTabSheet
|
||||||
Caption = 'List'
|
Caption = 'List'
|
||||||
ClientHeight = 373
|
ClientHeight = 384
|
||||||
ClientWidth = 294
|
ClientWidth = 294
|
||||||
object Panel7: TPanel
|
object Panel7: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 373
|
Height = 384
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 294
|
Width = 294
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
BorderWidth = 2
|
BorderWidth = 2
|
||||||
ClientHeight = 373
|
ClientHeight = 384
|
||||||
ClientWidth = 294
|
ClientWidth = 294
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object ListTree: TTreeView
|
object ListTree: TTreeView
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 369
|
Height = 380
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 290
|
Width = 290
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -127,22 +126,22 @@ object ComponentListForm: TComponentListForm
|
|||||||
object FilterPanel: TPanel
|
object FilterPanel: TPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 300
|
Width = 300
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 28
|
ClientHeight = 27
|
||||||
ClientWidth = 300
|
ClientWidth = 300
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object LabelSearch: TLabel
|
object LabelSearch: TLabel
|
||||||
AnchorSideLeft.Control = FilterPanel
|
AnchorSideLeft.Control = FilterPanel
|
||||||
AnchorSideTop.Control = FilterPanel
|
AnchorSideTop.Control = FilterPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 70
|
Width = 77
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'LabelSearch'
|
Caption = 'LabelSearch'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -152,10 +151,10 @@ object ComponentListForm: TComponentListForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = LabelSearch
|
AnchorSideTop.Control = LabelSearch
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 82
|
Left = 89
|
||||||
Height = 24
|
Height = 25
|
||||||
Top = 2
|
Top = 1
|
||||||
Width = 191
|
Width = 184
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -166,23 +165,28 @@ object ComponentListForm: TComponentListForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ButtonPanel: TPanel
|
object ButtonPanel: TPanel
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = Owner
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 34
|
Height = 29
|
||||||
Top = 433
|
Top = 438
|
||||||
Width = 300
|
Width = 300
|
||||||
Align = alBottom
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
ClientHeight = 34
|
AutoSize = True
|
||||||
|
ClientHeight = 29
|
||||||
ClientWidth = 300
|
ClientWidth = 300
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object UseAndCloseButton: TBitBtn
|
object UseAndCloseButton: TBitBtn
|
||||||
AnchorSideTop.Control = ButtonPanel
|
AnchorSideTop.Control = ButtonPanel
|
||||||
AnchorSideTop.Side = asrCenter
|
|
||||||
AnchorSideRight.Control = ButtonPanel
|
AnchorSideRight.Control = ButtonPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 175
|
Left = 158
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 2
|
Top = 1
|
||||||
Width = 115
|
Width = 132
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 9
|
BorderSpacing.Right = 9
|
||||||
|
@ -58,7 +58,6 @@ type
|
|||||||
InheritanceTree: TTreeView;
|
InheritanceTree: TTreeView;
|
||||||
PalletteTree: TTreeView;
|
PalletteTree: TTreeView;
|
||||||
TreeFilterEd: TTreeFilterEdit;
|
TreeFilterEd: TTreeFilterEdit;
|
||||||
procedure FormActivate(Sender: TObject);
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure UseAndCloseButtonClick(Sender: TObject);
|
procedure UseAndCloseButtonClick(Sender: TObject);
|
||||||
procedure ComponentsDblClick(Sender: TObject);
|
procedure ComponentsDblClick(Sender: TObject);
|
||||||
@ -129,16 +128,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComponentListForm.FormShow(Sender: TObject);
|
procedure TComponentListForm.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
ParentParent: TWinControl;
|
||||||
begin
|
begin
|
||||||
DebugLn(['*** TComponentListForm.FormShow, Parent=', Parent]);
|
ParentParent := Nil;
|
||||||
ButtonPanel.Visible := Parent=Nil;
|
if Assigned(Parent) then
|
||||||
UpdateButtonState;
|
ParentParent := Parent.Parent;
|
||||||
end;
|
DebugLn(['*** TComponentListForm.FormShow, Parent=', Parent, ', Parent.Parent=', ParentParent]);
|
||||||
|
ButtonPanel.Visible := ParentParent=Nil;
|
||||||
procedure TComponentListForm.FormActivate(Sender: TObject);
|
if ButtonPanel.Visible then begin
|
||||||
begin
|
PageControl.AnchorSideBottom.Side := asrTop;
|
||||||
ButtonPanel.Visible := Parent=Nil;
|
UpdateButtonState;
|
||||||
DebugLn(['*** TComponentListForm.FormActivate, Parent=', Parent]);
|
end
|
||||||
|
else
|
||||||
|
PageControl.AnchorSideBottom.Side := asrBottom;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComponentListForm.ClearSelection;
|
procedure TComponentListForm.ClearSelection;
|
||||||
|
Loading…
Reference in New Issue
Block a user