Hi there,
i have got the problem that the UltraTextEditor does not receive the Input Focus when calling the Focus() Method.
First of all, i set the UltraTextEditor as Active Control and after that i call the Focus() Method.
Then the UltraTextEditor is Active but does not have the Input Focus.
When i switch to an other open window and return back to my window with the UltraTextEditor, it receives automatic the Input Focus.
Does anyone have an idea?
Thank you.
It works.
I don't see how they type of delegate could make any difference. Are you saying it's still not working?
The MethodInvoker was not the Problem..
The ActiveControl was the Problem.
As following it doesnt work:
this.ActiveControl = myControl;
this.ActiveControl.Focus();
Thank you!
the MethodInvoker makes the difference...
i used a common delegate to invoke my method.
thanks a lot and have a nice day.
I just tested this out and it works fine for me:
private void Form1_Load(object sender, EventArgs e) { this.BeginInvoke(new MethodInvoker(this.SetFocusToUltraTextEditor)); } private void SetFocusToUltraTextEditor() { this.ultraTextEditor1.Focus(); }