Page 1 of 1

Resize/Move the chart with the form it's on.

Posted: Tue Nov 01, 2005 4:12 pm
by 9088874
Hi

Thank you for your help with my previous queries.

This time I have a really silly question. :oops:

How do I resize a teeChart to always fill the form as the user resizes the form?

I see that in the demo that all your charts do resize very well. I can't find the code that does that. In TeeCharts ActiveX version 5, I used to use the .Move method of the chart. There does not seem to be such a method any more. In the demo, I see there is some code about AutoSizeBaseScale, ResumeLayout, etc. Is this what does it?

I actually have the teeChart as part of a usercontrol, and I want it to resize both at design time when the control is put onto a form and at runtime when a user resizes the form.


Regards
Reg Bust

Posted: Wed Nov 02, 2005 12:55 pm
by narcis
Hi Reg Bust,

You're welcome.

You need to use:

Code: Select all

	tChart1.Dock=System.Windows.Forms.DockStyle.Fill;
You can do it programmatically as shown above or at design-time at TeeChart's properties editor.

Posted: Wed Nov 02, 2005 4:34 pm
by 9088874
Thank you.

Works beautifully.

I appreciate your help. :lol:

Posted: Thu Nov 03, 2005 8:46 am
by narcis
Hi Reg Bust,

You're welcome. I'm glad to hear that was what you needed.