protected virtual void OnSelectedChanged(EventArgs e) { this.Invalidate(); this.Update(); if (PopupMenu != null) { PopupMenu.Left = this.Parent.Left + this.Left; PopupMenu.Top = this.Parent.Top + this.Top + this.Height; PopupMenu.Visible = Selected; PopupMenu.BringToFront(); if (OnPopup != null) { OnPopup(PopupMenu, new EventArgs()); } } }