Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the path property of a TShellTreeView in Delphi 6

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I've searched and searched and still haven't found how to set the "path" property of a ShellTreeView. I want the Shelltreeview ti open to a specific path when a shortcut is right clicked, my code looks like this:

procedure TForm1.Properties1Click(Sender: TObject);
begin

if blist1.Selected.Index < 2 then
begin
prop.ShellTreeView1.Enabled:=false;
end
else
begin
prop.ShellTreeView1.Enabled:=true;
prop.ShellTreeView1.Path:=blist1.Selected.SubItems.Strings[0];
end;

but it doesn't do any thing. any ideas how i can get ti to open??

Thanx alot.
Samuel J. Johnson.
 
Sam124,

Set the Root property instead, e.g:

Code:
   shellTreeView1.Root :=
      blist1.Selected.SubItems.Strings[0];

Hope this helps...

-- Lance
 
Well that worked, but then the user cant select a new folder to asign to the shortcut., in other words i need the user to be able to change the folder to which the shortcut points, thats why i wanted to open it to the particular folder so they could go from there.

Any other ideas??

Thanx alot
Samuel J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top