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".
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.Parent
else
Fparent := ShellTreeView.Items[0];
FParent.Expanded:=false;
FParent.Expanded:=true;
FChild.Expanded:=true;
s:=FChild.GetTextPath+'/'+UserName;
ShellTreeView.Selected:=ShellTreeView.Items.FindNodeWithTextPath(s);
ShellTreeView.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?