Page 1 of 1

TButtonGradient Access Violation

Posted: Thu Apr 10, 2008 2:15 pm
by 10047392
Hi

I am trying to assign gradient colors to a TButtonGradient control at run time.

BG.Gradient.StartColor := clred;

When this line executes I receive an Access Violation, is there something I am doing wrong?

Delphi 2007/ TeeChart 8.02

Posted: Fri Apr 11, 2008 10:58 am
by narcis
Hi Rclement,

I'm not able to reproduce the issue here using Delphi 2007, v8.02 and the code below. Does it work fine at your end? Could you please modify it so that we can reproduce the issue here?

Code: Select all

  Chart1.Gradient.Visible:=true;
  ButtonGradient1.LinkGradient( Chart1.Gradient );
  ButtonGradient1.Gradient.StartColor:=clRed;
Thanks in advance.

Posted: Fri Apr 11, 2008 11:37 am
by 10047392
Sorry

My misunderstanding. The TButtonGradient works correctly. I thought that I could change the gradient 'OF' the button without a link to a chart.