Page 1 of 1

Resize TChart at runtime

Posted: Tue Mar 03, 2009 5:48 pm
by 10050873
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

Posted: Wed Mar 04, 2009 9:33 am
by yeray
Hi Calou,

Yes there is the property AllowResizeChart from TSelectorTool that allows the user to resize your chart.

Posted: Wed Mar 04, 2009 10:58 am
by 10050873
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

Posted: Wed Mar 04, 2009 12:38 pm
by yeray
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;

Posted: Wed Mar 04, 2009 1:38 pm
by 10050873
Wonderful :)