Magnus
unread,Aug 28, 2012, 8:09:42 AM8/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hello,
I have a Widget "SelectionField", which extends Composite and contains a label and a button, within a HorizontalPanel.
The label should always occupy all the horizontal space that is available besides the button.
I tried to set its width to "100%". I also tried around with RequiresResize and onResize, but nothing worked.
How would you do this?
Thanks
Magnus
-----
public class SelectionField extends Composite implements
{
private HorizontalPanel pnl = new HorizontalPanel ();
private Label lbl_Tournament = new Label ();
private PushButton btn_Select = new PushButton (">");
public SelectionField()
{
super ();
initWidget (pnl);
pnl.setBorderWidth(1);
pnl.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
pnl.add (lbl_Tournament);
pnl.add (btn_Select);
lbl_Tournament.setWidth("200px");
}
}