Tee9New example don't work under Delphi 2010 or XE

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Esposito
Newbie
Newbie
Posts: 9
Joined: Fri Apr 23, 2010 12:00 am

Tee9New example don't work under Delphi 2010 or XE

Post by Esposito » Thu Oct 14, 2010 4:14 pm

I have some problem with the TeeNew project under Delphi2010 and Delphi XE.

For example this syntax is wrong:
Chart1.Axes.Bottom.Items.Add(0,'<FONT color=Blue size=15>000').Format.TextFormat:=ttfHtml;

After Chart1.Axes.Bottom.Items.Add() method nothing is admited. And parent of TChartAxes.

The example in the docementation:
with Chart1.Axes.Left do
begin
Items.Clear; // remove all custom labels
// add custom labels
Items.Add(123,'Hello').Font.Size:=16;
Items.Add(466,'Good'#13'Bye').Transparent:=False;
Items.Add(300);
with Items.Add(-100) do
begin
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;

don't work under Delphi 2010 or XE.
Anaybody has an idea ?
Gerard Esposito

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

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Narcís » Fri Oct 15, 2010 9:45 am

Hi Gerard,

This works fine for me here using Delphi XE with our current sources. Which exact TeeChart version are you using? Have you checked v2010.01.11004 available at the client download area?

Thanks in advance.
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

Esposito
Newbie
Newbie
Posts: 9
Joined: Fri Apr 23, 2010 12:00 am

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Esposito » Mon Oct 18, 2010 10:16 pm

Hi Narcis,

My version is 2010.01.11004 but the project Tee9New.dpr don't is not compiled. For example this procedure failed to compile with errors as you see on the screenshot join

procedure TAxis_RetrieveOldLabelsForm.Button1Click(Sender: TObject);
var t : Integer;
begin
with Chart1.Axes.Bottom do
begin
// Save old labels
for t:=0 to Items.Count-1 do
OldLabels.Add(Items.Item[t].Value,Items.Item[t].Text);

Items.Clear; // remove all custom labels

// add html custom labels
Items.Add(0,'<FONT color=Blue size=15>000').TextFormat:=ttfHtml;

{ Other way
Items.Add(1,'<b><FONT color=BLUE size=15>1st</b>');
items.Item[0].TextFormat := ttfHtml;
}

// add custom labels
Items.Add(1,'1st');
Items.Add(2,'2nd');

with Items.Add(3,'etc...') do
begin
Font.Size := 15;
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;
end;


There is others problem with GDI+

Best regards
Attachments
Capture1.JPG
Capture1.JPG (121.02 KiB) Viewed 8948 times
Gerard Esposito

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Yeray » Tue Oct 19, 2010 2:16 pm

Hi Gerard,

I can compile and run the demo in the v2010.01 installer both in Delphi 2010 and XE without errors.
Could you please check that you have the TeeChart library paths in the top of the lists?
I see that both TextFormat (TTeeCustomShape) and Transparency (TTeeShape) were already present in v2010.00.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Esposito
Newbie
Newbie
Posts: 9
Joined: Fri Apr 23, 2010 12:00 am

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Esposito » Wed Oct 20, 2010 10:14 am

Hi Yerai and Narcis,

I don't understand the TaxisItem class:

TAxisItem=class
private
FFormat : TTeeShape;
FLabelPos : Integer;
FText : String;
FValue : Double;

IAxisItems : TAxisItems;

function GetFormat:TTeeShape;
procedure SetFormat(const Value:TTeeShape);
procedure SetText(const Value: String);
procedure SetValue(const Value: Double);
protected
function ActiveFormat:TTeeShape;
public
Destructor Destroy; override;

procedure Repaint;
property LabelPos:Integer read FLabelPos write FLabelPos;

//published (<-- Not TPersistent)

property Format:TTeeShape read GetFormat write SetFormat;
property Text:String read FText write SetText;
property Value:Double read FValue write SetValue;
end;


Delphi says that TextFormat and Transparency are not property frm TaxisItem class. It seems that it is good. My TeEngine.pas is perhaps not the good one?

Best regards and thanks for your help

Gérard.
Gerard Esposito

Esposito
Newbie
Newbie
Posts: 9
Joined: Fri Apr 23, 2010 12:00 am

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Esposito » Wed Oct 20, 2010 12:16 pm

Hi,

I join a sample program where the example don't work.

Best regards

Gérard.
Attachments
Capture2.JPG
Compiler answer
Capture2.JPG (101.33 KiB) Viewed 8892 times
Axis.zip
Sample
(9.28 KiB) Downloaded 473 times
Gerard Esposito

Esposito
Newbie
Newbie
Posts: 9
Joined: Fri Apr 23, 2010 12:00 am

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Esposito » Thu Oct 21, 2010 3:07 am

Hi,

I find the problem. The TAxisItem has a property name Format and this proerty has transparency font...
The example has to be rewritten in

Code: Select all

procedure TAxis_RetrieveOldLabelsForm.Button1Click(Sender: TObject);
var t : Integer;
begin
with Chart1.Axes.Bottom do
begin
// Save old labels
for t:=0 to Items.Count-1 do
OldLabels.Add(Items.Item[t].Value,Items.Item[t].Text);

Items.Clear; // remove all custom labels

// add html custom labels
Items.Add(0,'<FONT color=Blue size=15>000').Format.TextFormat:=ttfHtml;

{ Other way
Items.Add(1,'<b><FONT color=BLUE size=15>1st</b>');
items.Item[0]).Format.TextFormat := ttfHtml;
}

// add custom labels
Items.Add(1,'1st');
Items.Add(2,'2nd');

with Items.Add(3,'etc...').Format do
begin
Font.Size := 15;
Transparent:=False;
Transparency:=50;
Color:=clBlue;
end;
end;
end;

In the Tee9new project I find others problem:
  • in CircularGauge_Series unit the variable FrameElementPercents don't exist in the new Teechart and we have to create local variables.
    in TeeGDIPlusComponent unit the TeeGDIPlus1.AntiAliasText est de type TGDIPlusFontQuality and not a boolean. See below the interace of TeeGDIPLus
type
TGDIPlusFontQuality=(gpfBest, gpfDefault, gpfClearType, gpfNormal);
Gerard Esposito

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

Re: Tee9New example don't work under Delphi 2010 or XE

Post by Narcís » Mon Oct 25, 2010 10:23 am

Hi Gerard,

Code: Select all

In the Tee9new project I find others problem:

      in CircularGauge_Series unit the variable FrameElementPercents don't exist in the new Teechart and we have to create local variables.
      in TeeGDIPlusComponent unit the TeeGDIPlus1.AntiAliasText est de type TGDIPlusFontQuality and not a boolean. See below the interace of TeeGDIPLus
The demo works fine for us here using latest build available and Delphi XE. Can you please check that you installed correctly v2010.01.11004 in your IDE? That you have new version packages installed and that search paths point to the location where it is installed?

Thanks in advance.
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