SetPreviousFocusItem() public méthode

Set focus to the previous focus item inside the popup group.
public SetPreviousFocusItem ( ) : void
Résultat void
Exemple #1
0
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupGroup.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupGroup.SetNextFocusItem();
                break;

            case Keys.Space:
            case Keys.Enter:
                OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));

                // Get access to the popup for the group
                if ((VisualPopupManager.Singleton.CurrentPopup != null) &&
                    (VisualPopupManager.Singleton.CurrentPopup is VisualPopupGroup))
                {
                    // Cast to correct type
                    VisualPopupGroup popup = (VisualPopupGroup)VisualPopupManager.Singleton.CurrentPopup;
                    popup.SetFirstFocusItem();
                }
                break;
            }
        }
 private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
 {
     switch (e.KeyData)
     {
         case Keys.Tab | Keys.Shift:
         case Keys.Left:
             popupGroup.SetPreviousFocusItem();
             break;
         case Keys.Tab:
         case Keys.Right:
             popupGroup.SetNextFocusItem();
             break;
     }
 }
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupGroup.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupGroup.SetNextFocusItem();
                break;

            case Keys.Space:
            case Keys.Enter:
                // Generate appropriate event
                switch (_buttonType)
                {
                case GroupButtonType.Push:
                case GroupButtonType.Check:
                    // Exit keyboard mode when you click the group button
                    _ribbon.KillKeyboardMode();

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

                case GroupButtonType.DropDown:
                case GroupButtonType.Split:
                    // Kill the key tips mode
                    _ribbon.KillKeyboardKeyTips();

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

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

                    OnDropDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
                }
                break;
            }
        }
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                popupGroup.SetPreviousFocusItem();
                break;

            case Keys.Tab:
            case Keys.Right:
                popupGroup.SetNextFocusItem();
                break;

            case Keys.Space:
            case Keys.Enter:
                // Exit keyboard mode when you click the group button
                _ribbon.KillKeyboardMode();

                OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                break;
            }
        }
 private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
 {
     switch (e.KeyData)
     {
         case Keys.Tab | Keys.Shift:
         case Keys.Left:
             popupGroup.SetPreviousFocusItem();
             break;
         case Keys.Tab:
         case Keys.Right:
             popupGroup.SetNextFocusItem();
             break;
     }
 }
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
                case Keys.Tab | Keys.Shift:
                case Keys.Left:
                    popupGroup.SetPreviousFocusItem();
                    break;
                case Keys.Tab:
                case Keys.Right:
                    popupGroup.SetNextFocusItem();
                    break;
                case Keys.Space:
                case Keys.Enter:
                    OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));

                    // Get access to the popup for the group
                    if ((VisualPopupManager.Singleton.CurrentPopup != null) &&
                        (VisualPopupManager.Singleton.CurrentPopup is VisualPopupGroup))
                    {
                        // Cast to correct type
                        VisualPopupGroup popup = (VisualPopupGroup)VisualPopupManager.Singleton.CurrentPopup;
                        popup.SetFirstFocusItem();
                    }
                    break;
            }
        }
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
                case Keys.Tab | Keys.Shift:
                case Keys.Left:
                    popupGroup.SetPreviousFocusItem();
                    break;
                case Keys.Tab:
                case Keys.Right:
                    popupGroup.SetNextFocusItem();
                    break;
                case Keys.Space:
                case Keys.Enter:
                    // Exit keyboard mode when you click the group button
                    _ribbon.KillKeyboardMode();

                    OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
            }
        }
        private void KeyDownPopupGroup(VisualPopupGroup popupGroup, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
                case Keys.Tab | Keys.Shift:
                case Keys.Left:
                    popupGroup.SetPreviousFocusItem();
                    break;
                case Keys.Tab:
                case Keys.Right:
                    popupGroup.SetNextFocusItem();
                    break;
                case Keys.Space:
                case Keys.Enter:
                    // Generate appropriate event
                    switch (_buttonType)
                    {
                        case GroupButtonType.Push:
                        case GroupButtonType.Check:
                            // Exit keyboard mode when you click the group button
                            _ribbon.KillKeyboardMode();

                            OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                            break;
                        case GroupButtonType.DropDown:
                        case GroupButtonType.Split:
                            // Kill the key tips mode
                            _ribbon.KillKeyboardKeyTips();

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

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

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