|Top Previous Next|
The event requests coordinates of the control which called the given action.
TRVGetActionControlCoordsEvent = procedure (Sender: TrvAction; var R: TRect) of object;
property OnGetActionControlCoords: TRVGetActionControlCoordsEvent;
This event may occur when one of the following actions needs to position a color-picker window relative to the control which called this action:
This event occurs only when the component linked to the action is not a TControl (if a control executes the action, coordinates are calculated automatically).
Sender – the action that is being executed.
R = Rect(0,0,0,0).
R – screen coordinates of the control (if non-empty).
If this action is not processed, or if empty R is returned, a color-picker window will be displayed at the mouse pointer position.
This example shows how to work with TdxBarManager by Developer Express:
Sender: TrvAction; var R: TRect);
if (Sender.ActionComponent<>nil) and
(Sender.ActionComponent is TdxBarItem) then
with TdxBarItem(Sender.ActionComponent).ClickItemLink do begin
R := BarControl.GetItemRect (Control);
R.TopLeft := BarControl.ClientToScreen (R.TopLeft);
R.BottomRight := BarControl.ClientToScreen (R.BottomRight);
RichViewActions © trichview.com