ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellControls.TJamShellTree.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 .

For each context menu item, the following example will ask the user whether or not to execute the selected action:

procedure TMainForm.ShellTreeContextMenuSelect(const command: String;
var execute: Boolean);
begin
execute := mrYes =
MessageDlg('Execute command "'+ command +'" on folder:'+  ShellTree.SelectedFolder, mtConfirmation, [mbYes, mbNo], 0);
end;