If you want the whole content to occupy a certain percentage of the screen
height and never go beyond and become scrollable. Place the wrapper in
another wrapper that has a TableLayout.
For example, we want it to occupy 40% max:
Container c = new Container(BoxLayout.y());
c.setScrollableY(true);
TableLayout tl = new TableLayout(2, 1);
Constraint constraint = tl.createConstraint();
constraint.setHeightPercentage(60);
Container wrapper = new Container(tl);
wrapper.add(constraint, new Label(" ")).add(BorderLayout.south(c)); //
Label is a placeholder to occupy the top 60% and leave the remaining 40%
for your c container and its shell
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/39db1193-4fc5-4192-8fe2-3d30bc451c55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.