ShellBrowser Delphi Edition Documentation
ContentsIndexHome
PreviousUpNext
TShellBrowser.Next Method

Next enumerates the objects in the current folder.

Syntax
Pascal
function Next: Boolean;

Use Next to enumerate the objects in the current Folder. It returns false, when no object is left. After calling Next, ObjectName contains the name of the new object and TShellBrowser.IconNumber contains the number of the corresponding icon in the system image list. So you can easily fill Listboxes, TreeViews and ListViews with data.

These lines show how to fill a listview, so that it looks like an Explorer window:

While ShellBrowser.Next do begin Item := ListView.Items.Add; Item.Caption := ShellBrowser.GetShellObjectName; Item.ImageIndex := ShellBrowser.IconNumber; end;
Copyright (c) 2011. All rights reserved.