Page 1 of 1

Footer text with carriage returns

Posted: Wed Jan 21, 2009 5:55 pm
by 10546565
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>

Posted: Thu Jan 22, 2009 10:00 am
by narcis
Hi TestAlways,

I'm afraid this is a bug. I've added it (TV52013770) to the list to be investigated for next releases.

Posted: Thu Jan 22, 2009 1:34 pm
by 10546565
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?

Posted: Thu Jan 22, 2009 2:11 pm
by narcis
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.

Posted: Tue Feb 17, 2009 12:56 pm
by narcis
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;

Posted: Tue Feb 17, 2009 1:14 pm
by 10546565
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

Posted: Tue Feb 17, 2009 1:37 pm
by narcis
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