shellcontrols were under construction in D6, by steve trefethen from the delphi team, and have alot of errors...i know what to change to make your thing work but i dont know how it inflicts other parts of the code, but anyway, here i go:
open te file ShellCtrls wich contains the code (in Demos), add it to your library path and source path to compile. find the following procedure :
procedure TCustomShellTreeView.SetPathFromID(ID: PItemIDList);
var
I: Integer;
Pidls: TList;
Temp, Node: TTreeNode;
begin
if FUpdating or (csLoading in ComponentState)
or ((SelectedFolder <> nil) and SamePIDL(SelectedFolder.AbsoluteID, ID)) then Exit;
FUpdating := True;
Items.BeginUpdate;
try
Pidls := CreatePIDLList(ID);
try
Node := Items[0];
for I := 0 to Pidls.Count-1 do
begin
Temp := FolderExists(Pidls[I], Node);
if Temp <> nil then
begin
Node := Temp;
Node.Expand(False);
end;
end;
Node := FolderExists(ID, Node);
Selected := Node;
if Assigned(Node) then
begin
if Assigned(FListView) then
FListView.TreeUpdate(TShellFolder(Node.Data).AbsoluteID);
if Assigned(FComboBox) then
FComboBox.TreeUpdate(TShellFolder(Node.Data).AbsoluteID);
end;
finally
DestroyPIDLList(Pidls);
end;
finally
Items.EndUpdate;
FUpdating := False;
end;
end;
whenever you set the ShellView.Path property this procedure is called but the first line contains an error and causes to Exit without an update, so you could comment it out.
to change path with the new code use this:
ShellView1.Path := Edit1.Text