[TChartLegend] Switch horizontal - vertical

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[TChartLegend] Switch horizontal - vertical

Post by bertrod » Wed Sep 13, 2006 3:04 pm

Hello,

When you set the TChartLegend.Alignment property to laTop, the legend switch to a "horizontal look". In my program, sometimes I need to set the legend back to CustomPosition, but I would like to set it again in a vertical mode.

Is there a way to switch between those vertical and horizontal mode ?

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 Sep 14, 2006 9:54 am

Hello bertrod,

I think the easiest way to achieve that is before setting a custom position aligning the legend to a vertical position, for example:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Chart1.Legend.Alignment:=laRight;
  Chart1.Legend.CustomPosition:=true;

  Chart1.Legend.Left:=100;
  Chart1.Legend.Top:=100;
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

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Thu Sep 14, 2006 11:18 am

Ok, I thought there was a "cleaner" way. But i'll do as you suggest then. Thanks.

Post Reply