IDE/NewDlg: Added filter

This commit is contained in:
n7800 2025-06-18 02:38:42 +05:00 committed by Maxim Ganetsky
parent e0de58f8fe
commit 43b4f668d9
2 changed files with 49 additions and 19 deletions

View File

@ -24,23 +24,7 @@ object NewOtherDialog: TNewOtherDialog
ClientHeight = 390 ClientHeight = 390
ClientWidth = 729 ClientWidth = 729
TabOrder = 0 TabOrder = 0
object ItemsTreeView: TTreeView
Left = 0
Height = 390
Top = 0
Width = 295
Align = alClient
ExpandSignSize = 10
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
OnDblClick = OkButtonClick
OnSelectionChanged = ItemsTreeViewSelectionChanged
end
object DescriptionGroupBox: TGroupBox object DescriptionGroupBox: TGroupBox
AnchorSideLeft.Control = ItemsTreeView
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
@ -49,10 +33,11 @@ object NewOtherDialog: TNewOtherDialog
Top = 0 Top = 0
Width = 429 Width = 429
Align = alRight Align = alRight
BorderSpacing.Left = 2
Caption = 'DescriptionGroupBox' Caption = 'DescriptionGroupBox'
ClientHeight = 370 ClientHeight = 370
ClientWidth = 425 ClientWidth = 425
TabOrder = 1 TabOrder = 2
object DescriptionLabel: TLabel object DescriptionLabel: TLabel
Left = 6 Left = 6
Height = 15 Height = 15
@ -125,6 +110,47 @@ object NewOtherDialog: TNewOtherDialog
Align = alRight Align = alRight
ResizeAnchor = akRight ResizeAnchor = akRight
end end
object pnlList: TPanel
Left = 0
Height = 390
Top = 0
Width = 291
Align = alClient
BorderSpacing.Right = 2
BevelOuter = bvNone
ClientHeight = 390
ClientWidth = 291
TabOrder = 0
object TypeFilter: TTreeFilterEdit
Left = 0
Height = 23
Top = 0
Width = 291
CharCase = ecNormal
ButtonWidth = 23
Align = alTop
BorderSpacing.Bottom = 6
NumGlyphs = 1
MaxLength = 0
TabOrder = 0
FilteredTreeview = ItemsTreeView
end
object ItemsTreeView: TTreeView
Left = 0
Height = 361
Top = 29
Width = 291
Align = alClient
ExpandSignSize = 10
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 1
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
OnDblClick = OkButtonClick
OnSelectionChanged = ItemsTreeViewSelectionChanged
end
end
end end
object ButtonPanel: TButtonPanel object ButtonPanel: TButtonPanel
Left = 6 Left = 6

View File

@ -41,8 +41,9 @@ interface
uses uses
SysUtils, Classes, SysUtils, Classes,
// LCL // LCL
ComCtrls, Controls, Dialogs, Forms, StdCtrls, ExtCtrls, ComCtrls, Controls, Dialogs, Forms, StdCtrls, ExtCtrls, ButtonPanel,
ButtonPanel, ListViewFilterEdit, // LazControls
ListViewFilterEdit, TreeFilterEdit,
// LazUtils // LazUtils
LazUTF8, FileUtil, LazUTF8, FileUtil,
// IdeIntf // IdeIntf
@ -127,6 +128,8 @@ type
ButtonPanel: TButtonPanel; ButtonPanel: TButtonPanel;
DescriptionGroupBox: TGroupBox; DescriptionGroupBox: TGroupBox;
DescriptionLabel: TLabel; DescriptionLabel: TLabel;
pnlList: TPanel;
TypeFilter: TTreeFilterEdit;
ItemsTreeView: TTreeView; ItemsTreeView: TTreeView;
InheritableComponentsListView: TListView; InheritableComponentsListView: TListView;
CompFilterEdit: TListViewFilterEdit; CompFilterEdit: TListViewFilterEdit;
@ -334,6 +337,7 @@ begin
end; end;
NewParentNode.Expand(True); NewParentNode.Expand(True);
end; end;
TypeFilter.InvalidateFilter;
ItemsTreeView.EndUpdate; ItemsTreeView.EndUpdate;
end; end;