TColorDialog class
Implements a dialog used to select a TColor value.
Declaration
TColorDialog = class(TCommonDialog)Inheritance
- TColorDialog
- TCommonDialog
- TLCLComponent
TComponent
Description
TColorDialog is a TCommonDialog descendant which implements a
dialog used to select a color value from a palette of colors. It is a wrapper
for the native color selection dialog on platforms supported by the LCL (when
available).
The dialog allows a TColor value to be selected from a group of predefined basic colors, custom colors, or using a color wheel or pad. On some platforms, the color can be specified using RGB or HSL (Hue, Saturation, Luminosity) values.
Use the CustomColors property to define color values using identifiers and hexadecimal RGB values for the custom colors.
Use the Options property to control the features enabled or disabled when the dialog is executed.
Set the value for the Title property (when needed) prior to displaying the color selection dialog.
Call the Execute method to display the color dialog and capture
the color value. If the user clicks on the OK button in the dialog, the
selected color value is returned in the Color property and the UserChoice
property is set to mrOK. A value other than mrOK indicates that the color
selection dialog was cancelled or closed without selecting a color value.
See also
Properties
Title | published | The Title or Caption displayed in the title bar for the dialog. |
AlphaChannel | published | Indicates the opacity or transparency for the selected color. |
Color | published | Color selected by the user in the color dialog. |
CustomColors | published | Defines the color names and values available in the color dialog. |
Options | published | Indicates the optional features enabled (or disabled) for the color dialog. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
DefaultTitle | protected | Gets the default title used in the caption for the color selection dialog. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Inherited
From TCommonDialog (22)
AttachTo Close DoCanClose DoClose DoExecute DoShow Execute GetHeight GetWidth Handle HandleAllocated Height HelpContext OnCanClose OnClose OnDialogResult OnShow ResetShowCloseFlags SetHeight SetWidth UserChoice Width
From TLCLComponent (7)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance RemoveAllHandlersOfObject WidgetSetClass
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
