ShellCtrls & root property lazarus / 31-LCL ---------------------------------------------------------------------- warcode · 2010-03-18 19:51 Hi all i made a small application thats using a ShellTreeView, i dont understand why we can't not set the root property of this nice components. i dont know if it's realy the root property that i need if i wanna highlight a variable path Ex root    dir1    dir2       dir3       dir4    dir5    dir6 If i wanna highlight dir3 what i need to make ? Thanks for the help Christian F ---------------------------------------------------------------------- theo · 2010-03-18 21:08 I had the same problem and wrote a procedure for my purpose: Code: [Select]Procedure ShellTreeViewSetTextPath(STV:TShelltreeview; Path:String); Var Str: TStringList;   ANode: TTreeNode;   i: integer; Begin   If Not DirectoryExistsUTF8(Path) Then Exit;   Str := TStringList.Create;   Str.Delimiter := PathDelim;   Str.DelimitedText := Path;   For i:=Str.Count-1 Downto 0 Do     If Str[i]='' Then Str.Delete(i);   {$ifdef windows}     Str[0]:=Str[0]+PathDelim;   {$endif}   STV.BeginUpdate;   ANode := STV.TopItem;   For i:=0 To Str.Count-1 Do     Begin       While (ANode<>Nil) And (ANode.Text<>Str[i]) Do         Begin           ANode := ANode.GetNextSibling;         End;       If Anode<>Nil Then         Begin           Anode.Expanded := True;           ANode.Selected := True;           Anode := ANode.GetFirstChild;         End       Else        begin        str.free;        STV.EndUpdate;        Exit;        end;     End;   str.free;   STV.EndUpdate; End; Do you mean this? ---------------------------------------------------------------------- warcode · 2010-03-23 14:51 Hi theo yes it's exacly what i need, i got the latest svn version of ShellCtrls  here http://svn.freepascal.org/cgi- bin/viewvc.cgi/trunk/lcl/shellctrls.pas?root=lazarus&view=log It look c:\ are converted to c: so you function dont work with the new svn change ? it is a fast way to make it work again Thanks for your support Christian F