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

# TControl.CaptureMouseButtons

Indicates the mouse button(s) which are captured for the control.

## Declaration

Source position: controls.pp line 1794

`public property TControl.CaptureMouseButtons : TCaptureMouseButtons read FCaptureMouseButtons write FCaptureMouseButtons stored CaptureMouseButtonsIsStored default [mbLeft];`

## Description

CaptureMouseButtons is a TCaptureMouseButtons property with the set of mouse buttons which capture events for the control. It contains zero or more values from the TMouseButton enumeration. Up, down, click, double click, triple click, and quad click messages are handled for a mouse button when its value is included in the property.

The default value for the property is [mbLeft] and causes events to be handled for the Left mouse button.

Mouse capture is enabled for the button(s) when csCaptureMouse is included in the ControlStyle property.

ControlStyle and CaptureMouseButtons are used in message handlers which respond to mouse events, like: WMLButtonDDown, WMLButtonUp, WMLButtonDblClk, WMLButtonTripleClk, WMLButtonQuadClk, et. al.