Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 minimize changes window size
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gardenway

2 Posts

Posted - 17 May 2004 :  14:59:49  Show Profile  Reply with Quote

I created a chart in C# with fixed axes. If I minimize the chart and then restore it, the restored window incorrectly displays the chart window. The chart is now larger in size and is clipped by the viewport in the windows application. What might cause this?

Thank you,

John

quinncurtis

1164 Posts

Posted - 17 May 2004 :  19:20:15  Show Profile  Reply with Quote
We were unable to reproduce your problem using any of our example programs. Can you describe how one of our example programs can be changed to reproduce the problem.

Go to Top of Page

gardenway

2 Posts

Posted - 18 May 2004 :  09:32:11  Show Profile  Reply with Quote
I reproduced the problem by setting the anchor property in the form1 design window for the charttabdemo to top,left,right,bottom.

By changing the anchor property back to top,left, the problem goes away.

However, my misunderstanding persists. I am trying to create a chart that resizes when the form resizes. I use the call:

chartVu.SetResizeMode(ChartObj.AUTO_RESIZE_OBJECTS);

I place this at the end of my InitializeChart() code. However, the chart remains the same size when I resize the form.

Looking at the resizeable chart code, I see this call at the beginning of the constructor. I tried placing this call in the constructor for the usercontrol, but this did not work either.

I am sure that I am misunderstanding how to cause the resizing to work. I would like the usercontrol to change size with the form. That worked when I had the anchors set to all sides, but then the chart worked incorrectly when I minimized and restored.

Any clarification on how the resizable chart is built would be helpful.

Thank you,

John
Go to Top of Page

quinncurtis

1164 Posts

Posted - 18 May 2004 :  13:18:09  Show Profile  Reply with Quote
You should be able to add the parent Form Resize event to the form code. Then resize the ChartView in response to changes in the form size.

private void Form1_Resize(object sender, System.EventArgs e)
{
userChartControl11.Size = new Size( this.ClientSize.Width ,this.ClientSize.Height);
userChartControl11.Invalidate();
}
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07