I think in similar situations I've found that the text box has not actually
been displayed on the page (that is, not attached to the root panel) at the
time that I ask for it to receive focus. Perhaps that was the case with
you?  Might be worth checking.

Nick

On Sun, Nov 21, 2010 at 2:05 PM, steveb <[email protected]> wrote:

> I found that using a Timer works. I don't understand why but it does
> the job.
>
> On Nov 21, 8:52 pm, Magnus <[email protected]> wrote:
> > Hi,
> >
> > I am using a DialogBox as a login box and I would like the "user"
> > field to get the focus automatically.
> >
> > I tried txt_User.setFocus (true), but without success.
> >
> > How can I do that?
> >
> > Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to