How to place a control at the center of a canvas?
I have a main VLayout
set to 100% width and 100% height. I want to place a grid at the center of this layout, meaning at the center of the browser's "viewport". How to do that with smartGWT layouts?
setLayoutAlign(Alignment.CENTER)
This places the controls center to the layout's breadth axis. But if I nest HLayout
and VLayout
it is not giving desired results.
you have to set the layoutAlign on all nested Layout panels.
the configuration is not inherited from parent panels and while HLayout defaults to TOP, VLayout defaults to LEFT.