About palette's. How can I add my own "default " palettes, a
Posted: Fri Jun 17, 2016 11:26 am
I want to add my own "fixed" palette definitions, but would rather not rewrite the tchart code too much .
Custom palette is currently only halfway implemented since it does not allow me to adda "named" palete in a sensible way.
I have modified some chart sources to allow my series to be linked to a fixed palette entry (through index).
Now I would like to add my own, named, palette definitions to the tchart editor palette list, but steema's code learns me the palette resolving is "hardcoded" through a case statement, rather than through a neatly organized dictionary or something like that.
See
Any tips/hints on how to add my own custom, named palettes from within my own source code?
I would like something like:
and off course it's counbterpart:
and for completeness,
that makes sense.
Thanks
Hans
Custom palette is currently only halfway implemented since it does not allow me to adda "named" palete in a sensible way.
I have modified some chart sources to allow my series to be linked to a fixed palette entry (through index).
Now I would like to add my own, named, palette definitions to the tchart editor palette list, but steema's code learns me the palette resolving is "hardcoded" through a case statement, rather than through a neatly organized dictionary or something like that.
See
Code: Select all
class procedure TColorPalettes.GetPalette(Index:Integer; out Palette:TColorArray);
I would like something like:
Code: Select all
ColorPalettes.AddPalette('MyAppPalette',cMyColorPaletteArray);
Code: Select all
ColorPalettes.DeletePalette('MyAppPalette');
Code: Select all
ColorPalettes.Clear;
Thanks
Hans