ComponentFactory.Krypton.Toolkit.CommonHelper.GetControlWithFocus(System.Windows.Forms.Control)

Here are the examples of the csharp api class ComponentFactory.Krypton.Toolkit.CommonHelper.GetControlWithFocus(System.Windows.Forms.Control) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Krypton
Source File: CommonHelper.cs
public static Control GetControlWithFocus(Control control)
        {
            // Does the provided control have the focus?
            if (control.Focused && !(control is IContainedInputControl))
                return control;
            else
            {
                // Check each child hierarchy in turn
                foreach (Control child in control.Controls)
                    if (child.ContainsFocus)
                        return GetControlWithFocus(child);

                return null;
            }
        }