[SOLVED] TShellTreeview and filtering lazarus / 31-LCL ---------------------------------------------------------------------- superc · 2022-02-21 10:57 Hello, Does the ShellTreeview currently have a filtering mechanism by file/directory name? I am using lazarus 2.2 and fpc 3.2.3 32bit on Windows 64 thanks in advance. ---------------------------------------------------------------------- balazsszekely · 2022-02-21 11:19 Quote from: superc on February 21, 2022, 11:57:55 amHello, Does the ShellTreeview currently have a filtering mechanism by file/directory name? I am using lazarus 2.2 and fpc 3.2.3 32bit on Windows 64 thanks in advance. Loop through the nodes and hide the one you are not interested in? Like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   for I := 0 to ShellTreeView1.Items.Count - 1 do    if SomeCondition then      ShellTreeView1.Items.Item[I].Visible := False ---------------------------------------------------------------------- wp · 2022-02-21 11:19 There is an OnAddItem event in which you can set the CanAdd argument to false if you do not want to add the file specified in the other parameters to the tree. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type TAddItemEvent = procedure(Sender: TObject; const ABasePath: String;                            const AFileInfo: TSearchRec; var CanAdd: Boolean) of object; ---------------------------------------------------------------------- superc · 2022-02-21 11:35 both solutions are useful to me, thanks.