[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TToolButton.MouseMove

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

## Declaration

Source position: comctrls.pp line 2159

`protected procedure TToolButton.MouseMove(`
`Shift: TShiftState;`
`X: Integer;`
`Y: Integer`
`); override;`

## Arguments

`Shift` |  | Shift, Ctrl, or Alt modifier for the mouse message.
`X` |  | Horizontal coordinate for the mouse message.
`Y` |  | Vertical coordinate for the mouse message.

## 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

TControl.MouseMove |  | Handler for MouseMove events.