RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.DoContextPopup Method

OnContextPopup event dispatcher.

Pascal
procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); dynamic;
C++
__fastcall DoContextPopup(TPoint MousePos, Boolean Handled);

OnContextPopup calls any event handler attached to the OnContextPopup event. When creating a component that descends from TControl, override OnContextPopup to provide other responses in addition to the inherited event-handler call when the user invokes the control's context menu. 

MousePos indicates the position where the user right-clicked the control. If the user invoked the context menu using the keyboard, MousePos is (-1,-1). 

Handled returns a Boolean value indicating whether the control should continue with its default response to the user action. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!