Page 1 of 1

using Colors in code

Posted: Wed Mar 21, 2007 2:45 pm
by 9532498
I need to use some colors to set background etc. within the code. Where can I find the color definitions?

I need to do something like this:

mChart.GetGradient().SetMidColor(Yellow)
mChart.GetGradient().SetEndColor(White)
mChart.GetGradient().SetStartColor(Red)

What is the #define for Yellor or Red or White? Which header file do I have to include in my .cpp file to use the #defines?

Thanks.

Posted: Thu Mar 22, 2007 8:23 am
by narcis
Hi nbp,

You can add:

Code: Select all

#include "TeeChartDefines.h"
However, using this you'll only be able to use clTeeColor constant which is each series default color. For other options you should add colors using RGB method, for example:

Code: Select all

mChart.GetGradient().SetMidColor(RGB(255,0,0)) ;