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

# TColorButton.ColorDialog

The color selection dialog displayed when the control is clicked, or the ShowColorDialog method is called.

## Declaration

Source position: dialogs.pp line 386

`published property TColorButton.ColorDialog : TColorDialog read FColorDialog write FColorDialog;`

## Description

ColorDialog is a TColorDialog property which contains the color selection dialog displayed for the button control. ColorDialog is used in the ShowColorDialog method. A TColorDialog instance is created if one has not already been assigned to the property. It is freed (when created) when the color selection dialog is closed. A TColorDialog instance not created by the button control is not freed prior to exiting from the method or destroying the control.

The value in ButtonColor is assigned as the initial color selection for the dialog, and the Execute method in the dialog is called to capture the newly selected color value (when available). The new color selection is stored in the ButtonColor property.

## See also

TColorButton.ShowColorDialog |  | Displays a Color dialog and captures its result.
TColorButton.Click |  | Performs actions needed when the control is clicked.
TColorButton.ButtonColor |  | The TColor value selected in the button control.
TColorDialog |  | Implements a dialog used to select a TColor value.