ComponentFactory.Krypton.Ribbon.VisualPopupQATOverflow.SetPreviousFocusItem C# (CSharp) Method

SetPreviousFocusItem() public method

Set focus to the previous focus item inside the popup group.
public SetPreviousFocusItem ( ) : void
return void
        public void SetPreviousFocusItem()
        {
            // Find the previous item in sequence
            ViewBase view = _viewQATContents.GetPreviousQATView(ViewOverflowManager.FocusView);

            // Rotate around to the last item
            if (view == null)
                SetLastFocusItem();
            else
            {
                ViewOverflowManager.FocusView = view;
                PerformNeedPaint(false);
            }
        }

Usage Example

Example #1
0
        private void KeyDownPopupOverflow(VisualPopupQATOverflow c, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.Tab:
            case Keys.Right:
                // Ask the popup to move to the next focus item
                c.SetNextFocusItem();
                break;

            case Keys.Tab | Keys.Shift:
            case Keys.Left:
                // Ask the popup to move to the previous focus item
                c.SetPreviousFocusItem();
                break;

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

                // Generate a click event
                OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                break;
            }
        }
All Usage Examples Of ComponentFactory.Krypton.Ribbon.VisualPopupQATOverflow::SetPreviousFocusItem