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

TColorDialog.CustomColors

Defines the color names and values available in the color dialog.

Declaration

Source position: dialogs.pp line 287

published property TColorDialog.CustomColors : TStrings
  read FCustomColors
  write SetCustomColors;

Description

CustomColors is a TStrings property which contains the color names and hexadecimal values available in the color dialog. It allows a custom color palette to be used in place of the default colors for the platform.

Values added to CustomColors are in the "name=hexvalue" format. For example:

ADialog.CustomColors.Add('ColorA=FFFF00');
// or
ADialog.CustomColors.Values['ColorA'] := 'FFFF00';

The hexadecimal color value is 6-digits representing the RGB components for the color.

The default values in CustomColors are assigned in the Create constructor to the standard and extended colors for the platform. It does not include the equivalents for clDefault and clNone.

Use Color to get the TColor value selected using the dialog when the Execute method was called.

See also

TColorDialog.Color

  

Color selected by the user in the color dialog.

TCommonDialog.Execute

  

Displays the dialog and captures the result.


Version 3.2 Generated 2024-02-25 Home