UserPaletteColors property (LEADDlgColor Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

COLORREF UserPaletteColors [ L_UINT uIndex ]

Delphi Syntax

UserPaletteColors [ uIndex: L_UINT ]: COLORREF

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Sets a color in a palette that you define.

The user palette is an array of 256 elements. Each element is a long integer value containing the red, green and blue (RGB) components of the color. You can specify a color using the RGB function, and you can specify 256 or fewer colors.

Palettes are used only for images that are 8 bits per pixel or less.

To ignore the user palette, set the UserPaletteColorsCount property to 0.

To use your custom palette in the dialog boxes, fill the UserPaletteColors property with the desired colors, and set the UserPaletteColorsCount property to the number of colors.

This User Palette will be used when a dialog box needs a custom palette. It is associated with ColorRes dialog box, the CustomizePalette dialog box, and the Color dialog box.

See Also

Elements:

ShowColorResDlg method, ShowCustomizePaletteDlg method, ShowColorDlg method

Topics:

Imaging Common Dialogs: Properties, Methods, and Events