Auto-resizing of chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Agrilink
Newbie
Newbie
Posts: 38
Joined: Thu Feb 02, 2006 12:00 am

Auto-resizing of chart

Post by Agrilink » Fri Feb 24, 2006 12:03 am

Hi,

In the charting examples, the chart automatically resizes when the window is resized.

Is there some property of the chart I need to set to perform this behaviour. I can't see anywhere in the sample code how it's done.

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Feb 24, 2006 8:51 am

Hi Agrilink,

To achieve that you need to set tChart's Dock property at design-time at the property editor or at run-time using:

Code: Select all

tChart1.Dock=DockStyle.Fill;
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

Agrilink
Newbie
Newbie
Posts: 38
Joined: Thu Feb 02, 2006 12:00 am

Post by Agrilink » Sun Feb 26, 2006 9:07 pm

Hi Narcis,

Cheers, thanks for that.

Agrilink
Newbie
Newbie
Posts: 38
Joined: Thu Feb 02, 2006 12:00 am

Post by Agrilink » Sun Feb 26, 2006 10:14 pm

Hi Narcis,

Putting the chart in a panel doesn't resize it when resizing the window.

I've seen in some of the samples, a chart is contained in a panel and still resizes itself.

I've duplicated some of the relevant property settings, but I still get the same problem.

I tried it with the sample app I sent you previously and the chart doesn't resize.

Any ideas?

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 27, 2006 9:03 am

Hi Agrilink,

If you use a chart in a panel you need to set DockStyle for the panel and the chart:

Code: Select all

this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tChart2.Dock = System.Windows.Forms.DockStyle.Fill;
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

Post Reply