ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
JamControls.TJamCustomFileList.ShowContextMenu

Show the context menu for the selected items.

Syntax
Pascal
function ShowContextMenu(const p: TPoint): String; override;
Parameters 
Description 
const p: TPoint 
The point where the context menu should be shown.  

The command that was selected by the user.  

The method returns the name of the command, which has been executed. For more information, see TShellBrowser.ShowContextMenu.  

 

Use this method to show the shell context menu for all selected objects. The context menu will be shown automatically if the ShellContextMenu property is true. p is the screen position, where the context menu should be displayed. You can use the PopupMenu property to append your own menu items to the shell context menu.  

 

This example will show the context menu for the selected items in a TJamDriveList, after the user released the right mouse button:

procedure TMainForm.DriveListMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var Item : TListItem;
begin
if (Button!=mbRight) or (OtherCondition) then exit;
Item := List.GetItemAt(X,Y);
if not Assigned(Item) then exit;
DriveList.ShowContextMenu(DriveList.ClientToScreen(Point(X,Y)));
end;