protected OnControlRemoved ( System.Windows.Forms.ControlEventArgs e ) : void | ||
e | System.Windows.Forms.ControlEventArgs | A ControlEventArgs that contains the event data |
return | void |
protected override void OnControlRemoved(ControlEventArgs e)
{
// don't do anything if we are animating
// (as we're probably the ones who removed the control)
if (this.Animating)
{
return;
}
base.OnControlRemoved(e);
// remove the control from the itemList
if (this.Items.Contains(e.Control))
{
this.Items.Remove(e.Control);
}
// update the layout of the controls
this.DoLayout();
}