When you change folders within the tree, the path is reflected in the
edit box. But if you type in a path and click the button, it does NOT
update the tree. However, if you type a non-existent path, you'll get an
error message.
Is TShellTreeView.SetPath() broken?
--
Neil J. Rubenking
Contributing Technical Editor
PC Magazine
Look at the code for it, for the answer. It's in Demos\ShellControls:
SetPath:
FUpdating := True;
SetPathFromID(NewPIDL);
then:
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;
because FUpdating is set to true just before the call to SetPathFromID, it
*always* exits.
I commented out the
FUpdating := True
in SetPath. Hopefully it wont break anything else <g>
--
Dave Nottage
Dang! I did look at the source, but I didn't make the connection you did.
I'll try commenting out that line, as you suggest.