[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TControl.WMContextMenu

Handles a LM_CONTEXTMENU message for the control.

Declaration

Source position: controls.pp line 1419

protected procedure TControl.WMContextMenu(

  var Message: TLMContextMenu

); message;

Arguments

Message

  

Message examined and optionally handled in the method.

Description

No actions are performed in the method at design-time, or when the result code in Message has a non-zero value.

Calls DoContextPopup to signal the OnContextPopup event handler (when assigned). No additional actions are performed in the method if the context menu was displayed and executed in the OnContextPopup event handler.

Otherwise, the TPopupMenu instance in the PopupMenu property is displayed and executed by calling its Popup method.

The result code in Message is set to 1 if the context menu was displayed and executed in the method.

See also

TControl.PopupMenu

  

A context-sensitive menu that pops up when the right mouse button is clicked over this control.

TControl.DoContextPopup

  

Signals the OnContextPopup handler.

TControl.OnContextPopup

  

Invoked when a context-sensitive pop-up menu is requested.

TPopupMenu

  

Implements a menu panel that pops up on the screen when the right mouse button is clicked.


Version 3.2 Generated 2024-02-25 Home