Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxAlertWindowManager.OnMouseMove Event

In This Article

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

#Declaration

Delphi
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.

Delphi
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