Footer text with carriage returns

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Footer text with carriage returns

Post by TestAlways » Wed Jan 21, 2009 5:55 pm

8.04, D2007

I present a chart in two different sizes--one for my app, and one for printing. For printing, it is smaller, and what is a space in the footer text gets replaced with a carriage return. But the text reads from the bottom up, rather then the top down. To reproduce:

The following code in a chart dropped on a brand new form:

procedure TForm9.FormCreate(Sender: TObject);
begin
Chart1.Foot.Text.Text :=
'This is a test of how the'#13'footer should look when adding a carriage return';
end;

this results in the text appearing in the following order:

footer should look when adding a carriage return
This is a test of how the

i.e. it is reversed from what I would have expected.

Same thing if I try:

Chart1.Foot.Text.Clear;
Chart1.Foot.Text.Add(
'This is a test of how the');
Chart1.Foot.Text.Add(
'footer should look when adding a carriage return');


Is this by design? a bug? a feature?<g>

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 Jan 22, 2009 10:00 am

Hi TestAlways,

I'm afraid this is a bug. I've added it (TV52013770) to the list to be investigated for next releases.
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

TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Post by TestAlways » Thu Jan 22, 2009 1:34 pm

narcis wrote:I'm afraid this is a bug. I've added it (TV52013770) to the list to be investigated for next releases.
Thank you. Do you plan another 8.x release, or will the next release be 9?

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 Jan 22, 2009 2:11 pm

Hi TestAlways,

We expect to still have at least one maintenance release more for v8. However, I can't guarantee that this issue will be included.
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

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

Post by Narcís » Tue Feb 17, 2009 12:56 pm

Hi TestAlways,

This issue has been fixed for the next maintenance release. If you are a sourcecode customer you can easily change this in Chart.pas, changing the CalculateYPos call in DrawTitleLine nested method, at TChartTitle.DrawTitle, like this:

Code: Select all

  // Draws a line of title/footer text }
  procedure DrawTitleLine(AIndex:Integer);
  var St   : String;
      APos : Integer;
  begin
    St:=Text[AIndex];

    if IOnTop then APos:=CalculateYPos(AIndex*FontH+tmpFrameWidth)
              else APos:=CalculateYPos((Text.Count-AIndex-1)*FontH+tmpFrameWidth);

    if Alignment=taRightJustify then
       tmpXPosTitle:=ShapeBounds.Right-ParentChart.Canvas.TextWidth(St)-(tmpMargin div 2)
    else
    if Alignment=taCenter then
       tmpXPosTitle:=((ShapeBounds.Left+ShapeBounds.Right) div 2)-(ParentChart.Canvas.TextWidth(St) div 2);

    ParentChart.Canvas.TextOut(tmpXPosTitle,APos,St);
  end;
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

TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Post by TestAlways » Tue Feb 17, 2009 1:14 pm

This issue has been fixed for the next maintenance release.
Thank you. I've worked around it in my code, reversing the order the strings get added--but when do you expect the next maintenance release to be available? And will the release.txt (or readme.txt) file list the changes so I know where I need to fix my code?

Thank you,

Ed Dressel

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

Post by Narcís » Tue Feb 17, 2009 1:37 pm

Hi Ed,

A date hasn't been fixed yet but I think a new maintenance release could be available by the end of this quarter or beginning of 2nd quarter.

Release notes will include a list of bug fixes and new features implemented with tracking ID provided but not the sourcecode changes listed there. A release notes example can be seen here:

http://www.steema.com/files/public/teec ... elease.txt
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