Page 1 of 1

Align Legend to Chart title

Posted: Thu Nov 27, 2003 2:45 pm
by 8576430
Hello,
I have the Chart Title Aligned as taLeftJustify.
Now I want the legend to be on the same row as the Title. In my case the legend will always be one line.
Unfortunatly can't I find a way to get the postion of the Title.

Is there a way to do this via the Legend position custom Left en Top properties?

Thank you,
Perry

Posted: Thu Nov 27, 2003 4:27 pm
by Pep
Hi Perry,

to do this you can use the following code :

Code: Select all

  with Chart1 do
  begin
    Legend.Alignment := latop;
    Legend.CustomPosition := true;
    Draw;
    Legend.Top := Chart1.Title.Top;
    Legend.Left := Chart1.Title.Left + Chart1.Title.Width + 10;
  end;
Josep Lluis Jorge
http://support.steema.com

Thanks

Posted: Fri Nov 28, 2003 8:12 am
by 8576430
Thank you Josep,

Sometimes it is so simple!
But you have to see it :D

Perry