>From the look of your html code, your validation icon will continue to
be placed below your input because you are using a div as your
container for the icon. For GWT you can make this work by using a
HorizontalPanel, so basically you will have.

HorizontalPanel panel = new HorizontalPanel();

TextBox box = new TextBox();
box.setStylePrimaryName("text");

SimplePanel divPanel = new SimplePanel();
divPanel.setStylePrimaryName("validationIcon");

panel.add(box);
panel.add(divPanel);

This will get you to where you want to go, but there are other options
such as a FlowPanel or you could also use the InlineHTML widget.The
InlineHTML widget wraps text or html in a span. So you could also do:

InlineHTML html = new InlineHTML("");
html.setStylePrimaryName("validationIcon");

Then add it to the panel that contains your TextBox.

Hope this helped.

James

http://www.gwttutorials.com

On Aug 18, 7:51 am, Dominic <[email protected]> wrote:
> Hi
>
> We would like to extend the gwt TextBox such that it is wrapped by a
> span. The reason for this is  to integrate a validation icon. The
> rendered html should look something like this:
>
> <span class="my-TextBox" style="">
>     <input class="text" type="text"/>
>     <div class="validationIcon"/>
> </span>
>
> How can we achieve this?
>
> Regards,
> Dominic
--~--~---------~--~----~------------~-------~--~----~
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