protected new virtual void OnStyleChanged(EventArgs e) { this.SetChildBounds(); IDropDownChild child = this.Child; if (this.style == DropDownControlStyle.List) { if (child != null) { this.DetachChildEvents(); if (child.Focused) { this.Focus(); } this.Controls.Remove((Control)child); } this.AttachControlEvents(); } else { if (child != null) { this.DetachControlEvents(); this.Controls.Add((Control)child); if (this.Focused) { child.Focus(); } this.AttachChildEvents(); } } }
protected virtual void SetChildBounds() { IDropDownChild child = this.Child; if (child != null) { if (!child.Bounds.Equals(childBounds)) { child.SetBounds(childBounds.X, childBounds.Y, childBounds.Width, childBounds.Height); } } }