ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.IsFolder

Use the property IsFolder to check if the current object is a folder.

Syntax
Pascal
function IsFolder: Boolean;

True if the current object is a folder.

IsFolder will return true if the current object is a folder.

These lines show how to fill a branch of a treeview, so that it looks like the tree in the explorer.

While ShellBrowser.Next do begin
  if not ShellBrowser.IsFolder then continue;
  NewNode := TreeView.Items.AddChild(CurrentNode, ShellBrowser.GetShellObjectName);
  NewNode.ImageIndex := ShellBrowser.IconNumber;
  NewNode.SelectedIndex := ShellBrowser.SelectedIconNumber;
  NewNode.HasChildren := ShellBrowser.HasSubFolders;
end;