ShowColorDlg method (LEADDlgColor Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int ShowColorDlg(TWinControl* AOwnerCtrl );

Delphi Syntax

Function ShowColorDlg (AOwnerCtrl: TWinControl ): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Displays the Color dialog box, which allows the user to pick a color.

The layout and action of the dialog depends on the flags set in the DlgFlags property. Possible options are:

Value

Meaning

DLG_COLOR_SHOW_CONTEXTHELP

[$00000001] Dialog should contain a context sensitive help icon.

DLG_COLOR_SHOW_OLDCOLOR

[$00000002] Dialog should contain the Old color in a static control.

DLG_COLOR_SHOW_NEWCOLOR

[$00000004] Dialog should contain the New color in a static control.

DLG_COLOR_SHOW_NAME

[$00000008] Dialog should contain the name in a static control.

DLG_COLOR_COLORSPACE_SHOW_HUE

[$00000010] Dialog should contain the HSB-Hue Based color space

DLG_COLOR_COLORSPACE_SHOW_BRIGHTNESS

[$00000020] Dialog should contain the HSB-Brightness Based color space

DLG_COLOR_COLORSPACE_SHOW_WHEEL

[$00000040] Dialog should contain the HSB-Wheel Based color space.

DLG_COLOR_COLORSPACE_SHOW_RGB

[$00000080] Dialog should contain the RGB-3D Additive color space.

DLG_COLOR_COLORSPACE_SHOW_CMY

[$00000100] Dialog should contain the CMY-3D Subtractive color space.

DLG_COLOR_COLORSPACE_SHOW_CMYK

[$00000200] Dialog should contain the CMYK-3D Subtractive color space.

DLG_COLOR_COLORSPACE_SHOW_LAB

[$00000400] Dialog should contain the LAB- Device Independent color space.

DLG_COLOR_COLORMODEL_SHOW_RGB

[$00000800] Dialog should contain the RGB color values display.

DLG_COLOR_COLORMODEL_SHOW_HSB

[$00001000] Dialog should contain the HSB color values display.

DLG_COLOR_COLORMODEL_SHOW_HLS

[$00002000] Dialog should contain the HLS color values display.

DLG_COLOR_COLORMODEL_SHOW_CMY

[$00004000] Dialog should contain the CMY color values display.

DLG_COLOR_COLORMODEL_SHOW_CMYK

[$00008000] Dialog should contain the CMYK color values display.

DLG_COLOR_COLORMODEL_SHOW_LAB

[$00010000] Dialog should display the LAB color values display.

The following properties are associated with this dialog:

SelectedColor property

ColorSpace property

ColorModel property

UserPaletteColors property

UserPaletteColorsCount property.

Note that when UserPaletteColors property contains valid colors, the dialog will display only the colors in this palette, no available color spaces will be displayed, and only color values from this palette can be selected.

To include a Help button in the dialog, set the ShowHelpButton property to TRUE.

The Color dialog can be seen below:

image\Color.gif

See Also

Elements:

SelectedColor property, ColorSpace property, ColorModel property, UserPaletteColors property, UserPaletteColorsCount property, ShowBalanceColorsDlg method, ShowColoredGrayDlg method, ShowGrayScaleDlg method, ShowRemapIntensityDlg method, ShowRemapHueDlg method, ShowCustomizePaletteDlg method, ShowLocalHistoEqualizeDlg method, ShowIntensityDetectDlg method, ShowSolarizeDlg method, ShowPosterizeDlg method, ShowBrightnessDlg method, ShowContrastDlg method, ShowHueDlg method, ShowSaturationDlg method, ShowGammaAdjustmentDlg method, ShowHalftoneDlg method, ShowColorResDlg method, ShowHistoContrastDlg method, ShowHelpButton property, ZoomToFit Property, DlgFlags property, EnableMethodErrors property.

Topics:

Imaging Common Dialogs: Properties, Methods, and Events