public bool Focus() { if (focus == true) { return(true); } if (scMgr.control.Focused) { EventArgs e = new EventArgs(); ScLayer oldFocus = scMgr.FocusScControl; if (oldFocus != null) { oldFocus.ScLostFocus(e); } scMgr.FocusScControl = this; ScGotFocus(e); return(true); } scMgr.FocusScControl = this; scMgr.control.Focus(); return(true); }