ComponentFactory.Krypton.Ribbon.GroupButtonController.KeyTipSelect C# (CSharp) Method

KeyTipSelect() public method

Perform actual selection of the item.
public KeyTipSelect ( KryptonRibbon ribbon ) : void
ribbon KryptonRibbon Reference to owning ribbon instance.
return void
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Generate appropriate event
            switch (_buttonType)
            {
                case GroupButtonType.Push:
                case GroupButtonType.Check:
                    // Exit keyboard mode when you click the button spec
                    ribbon.KillKeyboardMode();

                    OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
                case GroupButtonType.DropDown:
                case GroupButtonType.Split:
                    // Exit the use of keyboard mode
                    ribbon.KillKeyboardMode();

                    // Pretend we have captured input and then fix state as pressed
                    _captured = true;
                    _fixedPressed = true;

                    // Redraw to show the fixed state
                    UpdateTargetState(Point.Empty);

                    OnDropDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
            }
        }