Series Gradient problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bart
Newbie
Newbie
Posts: 4
Joined: Tue Mar 31, 2009 12:00 am

Series Gradient problem

Post by Bart » Thu Feb 04, 2010 9:37 am

Hello.
I have a problem using Gradient object.
I create a bar series from code and edit it setting gradient using ChartEditor.
Then I want to change my gradient color from code, and there appears exception.
Debugger says, that bsMySeries->Gradient for some reason is NULL.

Code: Select all

   
TBarSeries* bsMySeries = (TBarSeries*) Chart1->Series[0];
bsMySeries->Gradient->Visible = true;
bsMySeries->Gradient->StartColor = clGreen;
I'm using version 8.06.
Please help.
Bart.

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

Re: Series Gradient problem

Post by Narcís » Thu Feb 04, 2010 4:19 pm

Hi Bart,

Code below works fine for me here:

Code: Select all

  Series1->BarStyle=bsRectGradient;
  Series1->Gradient->Visible=True;
  Series1->Gradient->StartColor=clGreen;
Does it work fine at your end? Does the problem occurs in a Delphi project? This could be a known C++ Builder subproperties alignment issue. We suspect that it could happen only with updated projects from earlier C++Builder versions. We are aware that there are some problems with code aligning when generating *.hpp and *.objc files for C++ Builder using dcc32 (Delphi compiler). Those problems usually are totally random but most visible with some subproperties which don't return a valid pointer. Hence some random Access Violation errors. This is a known C++ Builder error as you can see in the Quality Central entries below. This issue was supposed to be fixed in C++ Builder 2009 but it is not working perfectly yet.

http://qc.embarcadero.com/wc/qcmain.aspx?d=47943
http://qc.embarcadero.com/wc/qcmain.aspx?d=46158
http://qc.embarcadero.com/wc/qcmain.aspx?d=27917
http://qc.embarcadero.com/wc/qcmain.aspx?d=653

In some cases we found that the solution was creating a new project and adding your existing unit to it.

Hope this helps!
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