“into a standalone test case?”,
You mean, try tileLayaut be top level ?
If so, I try, everything is same.
Initial layout, the lavels are overlapping each other, shifting some pixels, lavels are on 1 line.
HostedMode, WebMode(Firefox, GoogleChrome, IE) same.
But Once I changed browser width, 50 labels are layouted correctly.
public void onModuleLoad(){
TileLayout tile = new TileLayout();
tile.setSize("100%", "100%");
tile.setLayoutPolicy(TileLayoutPolicy.FLOW);
tile.setOverflow(Overflow.VISIBLE);
tile.setAutoWrapLines(true);
tile.setShowEdges(true);
for(int i = 0; i < 50; i++){
Label label = new Label();
label.setContents("aaaaaaaaa"+i);
label.setAutoWidth();
label.setAutoHeight();
tile.addTile(label);
}
tile.draw();
}
I ran your sample. Label.setAutoWidth() it is interfering with the layout. If you remove it, it displays fine however the width of each tile is fixed. I’ve added a method TileGrid.layoutMembers() which you can call after drawing the TileGrid. Note that this method is subject to change / removal once your original testcase is handled.