Author |
Topic  |
|
gardenway
2 Posts |
Posted - 17 May 2004 : 14:59:49
|
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
|
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.
|
 |
|
gardenway
2 Posts |
Posted - 18 May 2004 : 09:32:11
|
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 |
 |
|
quinncurtis
1164 Posts |
Posted - 18 May 2004 : 13:18:09
|
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(); } |
 |
|
|
Topic  |
|
|
|