TShellTreeView and FindNodeWithTextPath lazarus / 31-LCL ---------------------------------------------------------------------- valter.home · 2021-04-25 16:01 I have a TShellTreeView in which I allow the user to create and delete folders. When one of these operations is performed I perform an update of TShellTreeView so that it shows the changes just made. In the case of creating a new folder to update the list I find the parent of the node that the user has chosen to create a new folder, I collapse it and expand it again, then I set the new folder created as "selected". 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 var  UserName, s: string;  FParent, FChild: TTreeNode; UserName:=NewNameFolder; [create new folder...] ShellTreeView.BeginUpdate;FChild:=ShellTreeView.Selected;if FChild.Text <> ShellTreeView.Root then  Fparent:=Fchild.Parentelse   Fparent := ShellTreeView.Items[0]; FParent.Expanded:=false;FParent.Exp anded:=true;FChild.Expanded:=true; s:=FChild.GetTextPath+'/'+UserName; ShellTreeView.Selected:=ShellTreeView.Items.FindNodeWithTextPath(s); S hellTreeView.EndUpdate; What is not clear to me is why GetTextPath or FindNodeWithTextPath returns the PathDelim as slash instead backslash? For example if ShellTreeView.Root = c:\ MyFolder all added folders are displayed as c:\MyFolder/NewFolder/NewFolder2 Under Windows can any inconveniences occur? ---------------------------------------------------------------------- wp · 2021-04-25 16:56 This is because these methods are introduced by the ancestor of TShellTreeView, TCustomTreeView, and this are valid in a more general sense. In case of TShellListView the recommended way to list a path is the method GetPathFromNode(ANode) which does use the correct directory separators.