Resize TChart at runtime

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Resize TChart at runtime

Post by Calou » Tue Mar 03, 2009 5:48 pm

Hello,

Would it be possible for an user to resize a chart at run time like the developer can do at design time.
When my application is running i would like that the user could resize a chart by using his mouse at the chart's corner

Are the TChart have special functions to do that?

Thanks for help

Regards

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

Post by Yeray » Wed Mar 04, 2009 9:33 am

Hi Calou,

Yes there is the property AllowResizeChart from TSelectorTool that allows the user to resize your chart.
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

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Post by Calou » Wed Mar 04, 2009 10:58 am

Thank you for your answer.

I create my charts at run time. Have you a simple example code to create a TselectorTool and assign it to my chart?

Regards

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

Post by Yeray » Wed Mar 04, 2009 12:38 pm

Hi Calou,

Yes of course. Here it is:

Code: Select all

uses TeeSelectorTool;

procedure TForm1.FormCreate(Sender: TObject);
var SelectorTool: TSelectorTool;
begin
  SelectorTool := TSelectorTool.Create(Chart1);
  SelectorTool.ParentChart := Chart1;
  SelectorTool.AllowResizeChart := true;
end;
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

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Post by Calou » Wed Mar 04, 2009 1:38 pm

Wonderful :)

Post Reply