Pen.Style after Delphi 2005 upgrade

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
kjs
Newbie
Newbie
Posts: 1
Joined: Mon Apr 11, 2005 4:00 am

Pen.Style after Delphi 2005 upgrade

Post by kjs » Tue Aug 30, 2005 6:01 pm

I have an existing application that was developed in D7. After Upgrading the application to Delphi 2005 Sp3 the Charts no longer print the line style assigned to each pen, just prints solid. If I try to change Pen to LinePen I get an error [Error] main.pas(1156): E2003 Undeclared identifier: 'LinePen' Yet in the Object Inspector I see LinePen not Line. This Happens on 2 different development computers.


Code: Select all

If not colorPrinter then
begin
for i := 0 to ch[x].SeriesCount-1 do
begin
      OldColor[i] := ch[x].series[i].SeriesColor;
      ch[x].series[i].SeriesColor := clblack;
      ch[x].Series[i].Pen.Width := 2;   
      case i of
              0: ch[x].series[i].Pen.style := psSolid;
              1: ch[x].series[i].Pen.Style := psDot;
              2: ch[x].series[i].Pen.Style := psDash;
              3: ch[x].series[i].Pen.Style := psDashDot;
              4: ch[x].series[i].Pen.Style := psDashDotDot;
              5: ch[x].series[i].Pen.Width := 1;
              6: ch[x].series[i].Pen.Width := 3;
      else
              ch[x].series[i].Pen.Style := psSolid;

      end;
end;
Delphi 2005 SP3
Teechart Pro 7.04
Windows XP sp2

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

Post by Narcís » Fri Sep 02, 2005 10:48 am

Hi kjs,

We are aware that Delphi 2005 has some Pen bugs since its first version. Some have been fixed by the updates but some no.

However, you can't access LinePen because you are trying to access it via the series array. In that case you'll need to typecast the series, for example:

Code: Select all

(ch[x].series[i] as TLineSeries).LinePen.Width:=5;
Regarding the Pen bugs, the Borland Quality Central reports below may help you finding a workaround for them.

http://qc.borland.com/wc/qcmain.aspx?d=9661
http://qc.borland.com/wc/qcmain.aspx?d=13225
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