using Colors in code

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

using Colors in code

Post by nbp » Wed Mar 21, 2007 2:45 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 22, 2007 8:23 am

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)) ;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply