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

# TToolButton.Down

Indicates whether the button is in the "Down" state, i. e. has it been selected or clicked.

## Declaration

Source position: comctrls.pp line 2200

`published property TToolButton.Down : Boolean read FDown write SetDown stored IsCheckedStored default False;`

## Description

Down is a Boolean property which indicates if the tool button is in a "pressed" or "down" state. The default value for the property is False, and causes the button to be drawn in its normal non-pressed state. Down is updated when mouse down or up messages are handled for the button.

The Style property determines whether the Down state is temporary or persistent. When Style contains tsButton, Down is reset to False when a mouse up message occurs for the button. For the tbsCheck style, it is a toggle; mouse down changes the state but mouse up does not automatically release it.

Changing the value for the property causes the control to be redrawn. It may also affect adjacent buttons on the tool bar with their Grouped properties enabled. When Down is enabled for a Grouped button, the other buttons in the group are updated to set their Down states to False.

Set Grouped to True to include the button in a group of adjacent buttons where only one of them can be in the Down state at any given time. The group does not extend beyond separator or divider buttons defined on the tool bar. Use AllowAllUp to control whether all of the buttons in a group can have their Down properties set to False.

Changing the property to True at design-time (or in program code) causes a non-grouped tool button to be drawn in the pressed state regardless of the setting in style. Display logic for the Style is reapplied when mouse messages are handled for the control.

## Version info

The implementation was modified in LCL version 3.0 to ensure that an endless loop is avoided when Down is changed for grouped button, or when GroupAllUpAllowed is called.

## See also

TToolButton.Grouped |  | Indicates if the tool button is a member of a group. The default value is False.
TToolButton.AllowAllUp |  | Indicates if all buttons in a group can have their Down property set to False.
TToolButton.Style |  | Determines the display style for the tool button.
TToolButton.GroupAllUpAllowed |  | Indicates if all buttons in the group are allowed to be in the 'Up' position.
TToolBar.Buttons |  | Lists with the tool buttons on the tool bar.
TToolButtonStyle |  | Enumerated type with values representing the display styles and behaviors for buttons on a TToolBar control.