ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellControls.TJamShellList.OnContextMenuSelect

This event occurs, if the user has selected a menu item of the shell context menu.

Syntax
Pascal
property OnContextMenuSelect: TOnContextMenuSelectEvent;

If the user has selected a menu item of the shell context menu, this event is fired. You can use it to decide, whether or not the selected action should be executed by adjusting the boolean variable execute. The default value of execute is true. The variable command contains the command string of the selected command (see also InvokeCommandOnSelected).

For each context menu item, the following example will ask the user whether or not to
execute the selected action:
procedure TMainForm.ShellListViewContextMenuSelect(const command: String; var execute: Boolean);
begin
execute := mrYes =
MessageDlg('Execute command "'+ command +'" on file:'+  ShellListView.Selected.Caption, mtConfirmation, [mbYes, mbNo], 0);
end;