playn - How to get a Borderlayout to fill its container? -
i gwt programmer trying grips using playn tripleplays gui library.
having little bit of problem working out how border layout filling space of container. (presumably middle space expanding fill available size)
borderlayout border = new borderlayout(3); grouping mainlayout = new group(border); mainlayout.setconstraint(axislayout.stretched()); button center= new button("test"); center.setconstraint(borderlayout.center); mainlayout.add(top); mainlayout.add(bottom); mainlayout.add(left); mainlayout.add(center);
top bottom , left specified borderlayout.left, top etc.
the whole thing added root screen with
_root.setconstraint(axislayout.stretched()); _root.add(0, mainlayout);
(_root has axislayout.vertical() ...which assuming makes deed gwt vertical panel)
at moment vertical space seems filled, not horizontal.
any ideas going wrong?
i suggest set
border.setconstraint(axislayout.stretched());
before adding border mainlayout. tell mainlayout strech kid widget.
playn tripleplay
No comments:
Post a Comment