public void CreateControl ()
{
if (is_created)
{
return;
}
if (is_disposing)
{
return;
}
if (!is_visible)
{
return;
}
if (parent != null && !parent.Created)
{
return;
}
if (!is_created)
{
is_created = true;
// Create all of our children (implicit ones as well) when we are created.
// The child should fire it's OnLoad before the parents, however
// if the child checks Parent.Created in it's OnCreateControl, the
// parent is already created.
foreach (Control c in Controls.GetAllControls ())
if (!c.Created && !c.IsDisposed)
c.CreateControl ();
OnCreateControl ();
}
}