ShellBrowser Delphi Edition Documentation
ContentsIndexHome
PreviousUpNext
TShellBrowser.SelectParent Method

Use SelectParent to select the parent folder.

Syntax
Pascal
function SelectParent: Boolean;

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 dependant). ShellBrowser.IconNumber returns the correct icon number for 'My Computer'.

Copyright (c) 2011. All rights reserved.