Regardez la following code:
(
var window, carousel;
window = Window(bounds:Rect(100,100,450,400)).front;
ScrollView(window, Rect(50,50,150,300)).hasHorizontalScroller_(false).canvas_(View().layout_(carousel = VLayout()));
5.do({
var tile = View().minHeight_(150).background_(Color.rand);
carousel.add(tile);
});
StaticText(window, Rect(250,50,150,50)).string_("For reference, the box below is 150 x 150:");
View(window, Rect(250,100, 150,150)).background_(Color.rand);
)
Each View added to the VLayout inside the ScrollView is told to have a minimum height of 150. However, all but the last have a height of about 50, or possibly they all have the correct height but theyāre being rendered partially atop one another.
I know thereās something Iām misunderstanding here, but I canāt for the life of me work out what it is.