ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonScrollPort.GetNextFocusItem C# (CSharp) Method

GetNextFocusItem() public method

Gets the next focus item based on the current item as provided.
public GetNextFocusItem ( ViewBase current ) : ViewBase
current ViewBase The view that is currently focused.
return ViewBase
        public ViewBase GetNextFocusItem(ViewBase current)
        {
            ViewBase view = null;
            ViewLayoutRibbonGroups groups = _viewFiller as ViewLayoutRibbonGroups;

            // If we contain a groups layout
            if (groups != null)
            {
                // Ask the groups for the next focus item
                view = groups.GetNextFocusItem(current);

                // Make sure client area of view is visible
                if (view != null)
                    ScrollIntoView(view.ClientRectangle, true);
            }

            return view;
        }