ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.SelectParent

Use SelectParent to select the parent folder.

Syntax
Pascal
function SelectParent: Boolean;

True if the parent could be selected successfully.

SelectParent will move one level up in the shell namespace. After calling SelectParent, the last folder will be the current object. You can use BrowseObject together with SelectParent to browse up and down in the shell namespace.

ShellBrowser.Folder := 'C:WindowsSystem';
ShellBrowser.SelectParent;

After this ShellBrowser.Folder would have the value 'C:Windows' and ShellBrowser.ObjectName would have the value 'System'. To get the icon number of the virtual folder 'My Computer', you could do the following:

ShellBrowser.Folder := '';
ShellBrowser.SelectParent;
inr := ShellBrowser.IconNumber

After this ShellBrowser.ObjectName is empty, because 'My Computer' does not have a file system path. ShellBrowser.GetShellObjectName would return 'My Computer' (language dependent). ShellBrowser.IconNumber returns the correct icon number for 'My Computer'.