You can use SuspendLayout() and ResumeLayout().
Also, try inheriting Panel and creating a custom class. Set the class style to use DoubleBuffering. It reduces flicker.
public class MyPanel : System.Windows.Forms.Panel
{
public MyPanel()
{
SetStyle(System.Windows.Forms.ControlStyles.Double Buffer, true);
SetStyle(System.Windows.Forms.ControlStyles.AllPai ntingInWmPaint, true);
SetStyle(System.Windows.Forms.ControlStyles.UserPa int, true);
}
}
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Alessandro Fragnani" <al*********@gmail.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I would like to know how to avoid flicker while adding controls to a panel. I couldn´t find any kind of "BeginUpdate/EndUpdate" on
it.
Thanks in advance
Alessandro