I’m trying to create a 3x3 cells grid with a template canvas component, where 3 templates will be added at runtime depending on the operator’s selections.
I ended up with the following layout
What I cannot solve is the grid resize: the grid created by the template canvas keeps the same width and height, no metter which size the template canvas has - desired behavior would be each cell is 33% the width and height of the canvas and each template inside keeps its original size aligning to the left or center of the cell.
The template canvas has a
ins 0, fill, debug Layout Constraints configuration and each tamplate has its layout set to
cell col row (I tried to had also
w 33%, but with no success).
Any help is appreciated, thanks in advance
P.S.: where should I put the row/column constraints I found in the MigLayout cheat sheet?
Partially got it to work: the problem was the Scroll Behaviour: must be
Unfortunately it’s not the final solution, because my layout now appears to be
The grid is apparently aligned to the right and to the bottom of the canvas: any suggestion to correct that behavior?
If I add a template with absolute positioning in the upper left corner, it will be placed as expected (please note the yellow template in the following picture)
May be any missing parameters in the miglayout configutaion?