Layout sometimes doesn't expand

Hi, I have a pretty complex form which adds/removes new fields according to user input. Unfortunately, sometimes it gets added to forum, but gets clipped as if the layout it’s in didn’t expand. The form has a GridLayout with other layouts inside it. The form is added to a horizontal layout with a Canvas of set size. Now this problem only occurs when the canvas or anything with set size is added to the horizontal layout. Once I click on something that requires repaint, it works as it should.

Add ?debug to your URL and try “Analyze Layout”. It will give you a List of potential Layout-problems. Try to solve these (You can enhance the readability of the output by using setDebugId()). Normally once you are done with that everything works fine.

The analyzer complains about not having defined layout size. Unfortunately, setting layout sizes makes things worse. For example, I set the width of the layout to allow to fit both the form and the canvas. The canvas is drawn on top of the form while there are plenty unused space. The analyzer doesn’t report any error though.

So a requestRepain() has made it happen sporadically now. It expands correctly most of the time. I’m happy with that. Thanks for help.