ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellControls.TJamShellTree.SelectedFolder

Gets or sets the selected folder.

Syntax
Pascal
property SelectedFolder: TFileName;

Use SelectedFolder to get or set the folder, which is currently selected in the TJamShellTree. If the given folder doesn't exist or cannot be selected, an exception will be raised.  

If the current folder does not have a file system path (e.g. SpecialFolder or locations on an attached mobile phone), a displayable name or path will be returned. Use SelectedItemIdList.DisplayName(TItemIdListDisplayNameFormat) for other formattings of the path or name of the folder.

To check, if the folder has been successfully selected, you can use code like this:

try
ShellTree.SelectedFolder := aPath;
except
ShowMessage('Not Found: ' + aPath);
end;