Chart flickering
Posted: Wed Dec 20, 2006 2:38 pm
Hello
I have a form with a "fill" docked panel. On that panel I have a "fill" docked tchart.
Whenever the form is resized, the tchart is also resized.
The problem is that while it is "resizing" (as long as the user doesn't stop pulling the border), the tchart flickers.
I had the same problem with a panel I had to paint on and it flickered too. To solve that I created a DoubleBufferedPanel that inherits from Panel and added to its constructor:
public class DoubleBufferedPanel : System.Windows.Forms.Panel
{
public DoubleBufferedPanel() : base()
{
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
}
}
Is there a solution for the chart flickering?
Thanks,
Libby
I have a form with a "fill" docked panel. On that panel I have a "fill" docked tchart.
Whenever the form is resized, the tchart is also resized.
The problem is that while it is "resizing" (as long as the user doesn't stop pulling the border), the tchart flickers.
I had the same problem with a panel I had to paint on and it flickered too. To solve that I created a DoubleBufferedPanel that inherits from Panel and added to its constructor:
public class DoubleBufferedPanel : System.Windows.Forms.Panel
{
public DoubleBufferedPanel() : base()
{
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
}
}
Is there a solution for the chart flickering?
Thanks,
Libby