Sign in Join
FPDoc Onlineexperiment

TToolButton.MouseMove procedure

Member of TToolButtonprotectedIn unit ComCtrls

Detects whether the mouse is hovered over the drop-down indicator for the tool button.

Declaration

pascal
procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer)
 ; override

Description

MouseMove is an overridden method in TToolButton used to handle mouse movement messages for the control. It provides support for detecting when the mouse pointer is hovered over the drop-down indicator for a tool bar button.

It calls the inherited method on entry to handle drag messages, and to signal the OnMouseMove event handler (when assigned).

If MouseCapture is not enabled for the control, and the button uses tbsDropDown in its Style property, the PointInArrow method is called is called to detect whether the mouse in inside the display area for the drop-down indicator. The value tbfMouseInArrow is include in or excluded from the flags for the tool button based on the return value from PointInArrow.

Invalidate is called to redraw the button if the flag values were modified.

MouseMove is called from the WMMouseMove message handler.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.