Back to Devexpress

TdxChartPaletteRepository.FindPalette(string,Boolean) Method

vcl-dxchartpalette-dot-tdxchartpaletterepository-dot-findpalette-x28-system-dot-string-system-dot-boolean-x29.md

latest2.7 KB
Original Source

TdxChartPaletteRepository.FindPalette(string,Boolean) Method

Returns the stored user or standard palette with the specified name.

Declaration

delphi
function FindPalette(const AName: string; AAllowStandardPalette: Boolean = True): TdxChartPalette;

Parameters

NameTypeDescription
ANamestring

The target user or standard palette name.

The function iterates through stored palettes and returns the palette whose name matches the parameter value.

If the repository contains no palette with the required name, the function returns nil (in Delphi) or nullptr (in C++Builder).

| | AAllowStandardPalette | Boolean |

Optional. Specifies if the function searches a palette with the specified name among the list of predefined palettes:

True Default. The function iterates through all stored color palettes and returns the palette whose name matches the AName parameter value.FalseThe function iterates only through the list of user palettes and returns the palette whose name matches the AName parameter value. |

Returns

TypeDescription
TdxChartPalette

The stored user or standard palette whose name matches the AName parameter value.

The function returns nil (in Delphi) or nullptr (in C++Builder) if the repository contains no palette with the specified name.

Tip

Cast the returned value to the TdxChartUserPalette class if it is a user palette to access all public API members. Call the ClassType function to identify the actual palette class.

|

See Also

TdxChartPaletteRepository.Items Property

TdxChartStandardPaletteRepository.FindPalette Function

TdxChartPaletteRepository Class

TdxChartPaletteRepository Members

dxChartPalette Unit