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

# TControl.DoMouseUp

Performs actions needed to handle a mouse up event for the control.

## Declaration

Source position: controls.pp line 1488

`protected procedure TControl.DoMouseUp(`
`var Message: TLMMouse;`
`Button: TMouseButton`
`); virtual;`

## Arguments

`Message` |  | Mouse message examined and handled in the method.
`Button` |  | Mouse button for the message.

## Description

DoMouseUp is a virtual method used to apply the mouse button up event in the Message and Button arguments. DoMouseUp checks the control style flags in ControlStyle to determine whether the control responds to standard mouse events.

No actions are performed in the method when csNoStdEvents has been included in ControlStyle. This indicates that mouse events are handled by the widgetset class instance for the control.

Otherwise, values in Message and Button are applied in the method. When DragManager is active for a drag and drop operation, the mouse coordinates in Message are converted to screen coordinates and applied using the DragManager. The Result member in Message is set to 1 to show that is has been handled.

The MouseUp method is called to signal the OnMouseUp event handler (when assigned).

DoMouseUp is called from methods like WMLButtonUp, WMRButtonUp, WMMButtonUp, and WMXButtonUp.

## See also

TControl.ControlStyle |  | Contains style flags which control the features or behaviors enabled for the control.
TControl.MouseUp |  | Signals the OnMouseUp handler.
TControl.OnMouseUp |  | Event handler signalled when a mouse up event is handled for the control.
TControl.WMLButtonUp |  | Message handler for left mouse button up events.
TControl.WMRButtonUp |  | Message handler for right mouse button up events.
TControl.WMMButtonUp |  | Message handler for middle mouse button up events.
TControl.WMXButtonUp |  | Message handler for extra mouse button up events.