This content has been marked as final. Show 5 replies
You can set the focus to that control. See the FocusManager.
If you have already clicked anywhere in the application before you get to your form, you will have no issue.
Thanks ntsiiii, I have tried that already. Yes focusManager does select that field but does not place the cursor in there. Thats whats bothering me. I don't want the user to have to click on the field before starting to type.
If you use setFocus the FormItem has the focus, and if you click anywhere other than a control that can accept the cursor, the cursor is initially in the FormItem that has the focus. So this may be the closest you can get. You could always do a bit of fancy skinning to ensure the user's attention is directed to the control that initially has the focus, but not the cursor.
I personally haven't tried it but I was wondering would tabIndex property help here?
Did you try myField.setFocus()?
It works for me, setting the edit cursor in the focused field, subject to the FP focus issue I explained.