My requirement: When the user swaps to the layout containing a Grid, that Grid would be displayed in standard scrolling position, regardless of prior scrollings. In an ideal world, I’d programmatically do this when swapping the Grid in:
myGrid.scrollToStart();
myGrid.scrollToLeft();
But the scrollToLeft() doesn’t exist. So my ugly, inefficient work-around is to completely create a new grid:
myLayout.removeComponent(myGrid);
myGrid = new MyGrid();
myLayout.addComponent(myGrid, whereItGoes)
It works, but there must be a better way. (?)