Skip to main content
A newer version of this page is available. .

TdxAlertWindowManager.OnMouseMove Event

Enables you to perform custom actions when an end-user moves the mouse pointer within an alert window‘s area.

Declaration

property OnMouseMove: TdxAlertWindowManagerMouseMoveEvent read; write;

Remarks

You can handle this event in combination with other mouse tracking events (OnMouseEnter, OnMouseLeave, OnMouseDown, OnMouseUp, OnDragBegin, OnDragMove, and OnDragEnd).

Sender specifies the alert window manager.

AAlertWindow specifies the alert window within which the mouse pointer has moved. You can determine the element under the mouse pointer using the AAlertWindow.HitTest property.

AShift determines the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.

X and Y are the new mouse pointer coordinates relative to the alert window’s top-left corner.

The following example shows how to allow an end-user to copy a message text to the clipboard by moving the mouse pointer over it.

uses
  ..., Clipbrd;
procedure <Form>.<dxAlertWindowManager>MouseMove(Sender: TObject; AAlertWindow: TdxAlertWindow; AShift: TShiftState; X, Y: Integer);
begin
  with AAlertWindow.HitTest do
  begin
    HitPoint := Point(X, Y);
    if HitAtMessageText and (Clipboard.AsText <> HitMessageText.Text) then
      Clipboard.AsText := HitMessageText.Text;
  end;
end;
See Also