ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.MultiObjects

Use MultiObjects if you want use ShowContextMenu or InvokeContextMenuCommand for multiple files and folders.

Syntax
Pascal
property MultiObjects: IItemIdListCollection;

First set the Folder property, then add all files to MultiObjects, which you want to include in the next context menu operation (the files added to MultiObjects have to be relative to the Folder property). Then call ShowContextMenu or InvokeContextMenuCommand. After that, MultiObjects will be empty again. ShowContextMenu and InvokeContextMenuCommand will use the files in MultiObjects, if it is not empty, otherwise they use the current object in the property ObjectName.

This Example shows how to use MultiObjects with a ListView, where the property MultiSelect is true.

ShellBrowser.Folder := currentfolder;     // set folder
for i:=ListView.Selected.Index to ListView.Items.Count-1 do
  if ListView.Items[i].Selected then      // now add file names
    ShellBrowser.MultiObjects.Add(ListView.Items[i].Caption);
ShellBrowser.ShowContextMenu(ListView.ClientToScreen(Point(x,y))),