/// <summary> /// Move keyboard focus to a named control. /// </summary> /// <param name="controlName">Name of focusable control</param> public void FocusControl(string controlName) { Control fc = Grid.FindControlByName(controlName); if (fc != null && fc.IsFocusable) { FocusedControl = fc as IFocusable; } else { FocusedControl = null; } }
/// <summary> /// Update GUI Frame /// </summary> public virtual void Update() { if (_UnFocusRequestExecuted) { _UnFocusRequest = false; _UnFocusRequestDotoExtendedIsFocused = false; _UnFocusRequestExecuted = false; if (!string.IsNullOrEmpty(_FocusedControlName)) { if (_FocusedControl == null || _FocusedControl.Name != _FocusedControlName) { FocusedControl = Grid.FindControlByName(_FocusedControlName) as IFocusable; } } } }