Page 1 of 1

Massive Gridband Problems when resizing window

Posted: Thu Jul 27, 2006 10:58 am
by 9638326
Hi,

i got a chart window like this :

[img]
http://i69.photobucket.com/albums/i72/A ... esgone.jpg
[/img]

When i noticed the gridband covering the X axis perfectly, which is, in this case at least, not really wanted, i chose the only option i know/have found to prevent this - to set the axis not behind the scene with doin this :

[img]
http://i69.photobucket.com/albums/i72/A ... /menue.jpg
[/img]

Now everthing looked fine until you try to resize the applicationwindow with the common topright windowbuttons(_,[],X) .
When u shrink the application from a maxsize window to normalsize window u get something like this, the gridbands breaking through the x axis :

[img]
http://i69.photobucket.com/albums/i72/A ... esized.jpg
[/img]

and to fullsizewindow again gets you this :

[img]
http://i69.photobucket.com/albums/i72/A ... larged.jpg
[/img]

the inner alignments of the horizontal grid lines are totally messed up.
the .update() method is to weak for this but a chart.refresh() does the job but still not even good.
since theres no event for a resize_finished i tried out a little by setting a timerevent to the resize to make sure the refresh comes after the resize done but even with immediatly done after, theres too much time to fix this scenery !
so whats wrong with the gridband in the first place and how to fix this ?
thx and best regards,

Rob

Posted: Thu Jul 27, 2006 11:29 am
by narcis
Hi Rob,

Thanks for reporting. I could reproduce the issue and added it (TF02011627) to our defect list to be fixed for future releases.

In the meantime, a workaround is using the trick below in the chart Resize event to force the chart being fully repainted.

Code: Select all

    private void tChart1_Resize(object sender, EventArgs e)
    {
      //Workaround
      Bitmap bmp = tChart1.Bitmap;
    }