protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void | ||
levent | System.Windows.Forms.LayoutEventArgs | An EventArgs that contains the event data. |
리턴 | void |
protected override void OnLayout(LayoutEventArgs levent)
{
base.OnLayout(levent);
// Only use layout logic if control is fully initialized or if being forced
// to allow a relayout or if in design mode.
if (IsHandleCreated || _forcedLayout || (DesignMode && (_listBox != null)))
{
Rectangle fillRect = _layoutFill.FillRect;
_listBox.SetBounds(fillRect.X, fillRect.Y, fillRect.Width, fillRect.Height);
}
}