Extending Color Palettes

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Extending Color Palettes

Post by Ed » Wed Jun 02, 2004 3:06 pm

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.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Wed Jun 09, 2004 6:52 pm

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.
Marjan Slatinek,
http://www.steema.com

Post Reply