The TextBox has to be loaded and visible on the page before setFocus
works.  You might use onLoad, or I just use a generic DeferredCommand
method to set focus as part of a widget's constructor:

    public static void setFocus(final FocusWidget wid)
    {
        DeferredCommand.addCommand(new Command()
        {
            public void execute()
            {
                wid.setFocus(true);
            }
        });
    }

-- 
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