Tuesday, July 19, 2016

Setting Width of a TextBox inside LayoutPanel

Hello all,

I have a LayoutPanel with one widget added to it (a TextBox).   I want to make the TextBox's width equal to the LayoutPanel's width.

I thought this would work, but it does not (the TextBox is much narrower than the LayoutPanel's width):

LayoutPanel pnl = new LayoutPanel();
TextBox tb = new TextBox();
pnl.add(tb);

pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);

Any idea why it doesn't work?  Or ideas for a better approach?


Thanks

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment