protected override void OnMouseLeave (EventArgs e) { if (popupButtonState == PopupButtonState.Up) popupButtonState = PopupButtonState.Normal; Invalidate (); base.OnMouseLeave (e); }
protected override void OnClick (EventArgs e) { popupButtonState = PopupButtonState.Down; Invalidate (); base.OnClick (e); }
protected override void OnMouseEnter (EventArgs e) { if (popupButtonState != PopupButtonState.Down) popupButtonState = PopupButtonState.Up; PopupButtonPanel panel = Parent as PopupButtonPanel; if (panel.focusButton != null && panel.focusButton.ButtonState == PopupButtonState.Up) { panel.focusButton.ButtonState = PopupButtonState.Normal; panel.SetFocusButton (null); } Invalidate (); base.OnMouseEnter (e); }