Using br tag isn't a good solution for your problem. It's better using
CSS style to manage the page organization.
For exemple, you can put a nameAndLabel.addStyleClass("xybox"); and
style:
.xybox {
float: left; width: 400px;
}
.xybox label {
float: left; width: 400px; margin: ..
}
.xybox input {
float: left; width: 400px;
}
In this case you should including nameAndLabel panel in float: left
panel or position: relative panel.
It is important to separate the content from container.
On 1 déc, 19:55, Yozons Support on Gmail <[email protected]> wrote:
> I have found that using InnerLabel with InnerHTML and a TextBox, I can come
> close to making it cleaner HTML than the overhead of a table just to put a
> label and input field together, with something like:
>
> FlowPanel nameAndLabel = new FlowPanel();
> InlineLabel label = new InlineLabel("Name");
> TextBox nameField = new TextBox();
> nameField.setValue("Bob");
> nameAndLabel.add(label);
> nameAndLabel.add( new InlineHTML("<br/>") );
> nameAndLabel.add(nameField);
>
> But the Label class doesn't actually generate a <label> tag, so the label is
> not also associated with the TextBox for accessibility (it's just a span).
>
> The idea of having labeled input fields is so basic, that there must be a
> nicer solution. I noted that RadioButton does a good job of associating the
> label with the radio button itself.
>
> Is there something comparable in GWT 2 to make the label/TextBox (or other
> input widgets) go together to produce simple HTML like:
>
> <label>Name<br/><input ></label>
>
> Thanks for any tips....
--
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.