seinecle
seinecle

Reputation: 10778

How to make several Components resize vertically to fit in the available space in CodenameOne?

I have a Container which will include a varying number of pictures (ScaledImageLabel), ordered vertically. I'd like that the pictures resize so that they never get hidden: they resize so that collectively, they take up te available vertical space.

I tried different layouts but can't figure how to get this result?

Upvotes: 1

Views: 41

Answers (1)

Shai Almog
Shai Almog

Reputation: 52760

I would suggest a grid layout with a non-scrollable container so you would do something like this:

parentForm.setScrollableY(false);
parentForm.setLayout(new GridLayout(getComponentCount(), 1));

Upvotes: 1

Related Questions