Habanero.Faces.Win.ControlMapperStrategyWin.GetNextControlInTabOrder C# (CSharp) Method

GetNextControlInTabOrder() protected static method

Provides the next item in the tab order on a control
protected static GetNextControlInTabOrder ( Control parentControl, Control control ) : Control
parentControl System.Windows.Forms.Control The parent of the controls in question
control System.Windows.Forms.Control The current control
return System.Windows.Forms.Control
        protected static Control GetNextControlInTabOrder(Control parentControl, Control control)
        {
            var nextControl = GetNextControl(parentControl, control);
            if (nextControl == null)
            {
                return GetFirstControl(parentControl, control);
            }
            if (!nextControl.TabStop)
            {
                return GetNextControlInTabOrder(parentControl, nextControl);
            }
            return nextControl;
        }