Page 1 of 1

Extending Color Palettes

Posted: Wed Jun 02, 2004 3:06 pm
by 9336214
It looks like from the implementation of the Color Palettes (in TColorPalettes.ApplyPalette) there is no way to extend the palettes--they are hard coded. It would be nice if this was extendable.

Posted: Wed Jun 09, 2004 6:52 pm
by Marjan
Hi, Ed.

True, the palettes are declared as const Array[0..X] of TColor so you cannot change them. Workarounds:
+ define new extended custom palette with different name and use it as palette in your themes;
+ (not recomennded, but possible) change Teechart source code and declare palettes as var Array of TColor and then set them up in the unit initialization section.

I'd go with the first approach i.e. define customized palette and use it in themes.