ShellBrowser Delphi Components Documentation
|
Use SelectedIconNumber to get the number of the 'opened' icon for the current object.
property SelectedIconNumber: Integer;
SelectedIconNumber contains the number of the 'opened' icon in the system image list. Only the selected icons of folder objects will differ from the normal icon. Use the component TJamSystemImageList to get access to the image list of Windows. You can use SelectedIconNumber to set the SelectedIndex property of a TTreeNode.
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;