I need to know the current size of a FlexTable
in order to resize a DialogBox
accordingly (FlexTable
lives inside the DialogBox
).
I did not find a way to do that automatically, but I would at least want to be able to do it manually be determining the height and the width of the FlexTable
and then resize the DialogBox
accordingly.
Does anybody know how to do that?
determine the current size of a FlexTable in GWT
271 views Asked by TomS At
2
There are 2 answers
0
On
I think I've found it out just now. Its the following method of the FlexTable class:
FlexTable ft = new FlexTable();
...
int width = ft.getElement().getStyle().getWidth();
int height = ft.getElement().getStyle().getHeight();
But that still does not work with my DialogBox issue. It's still not resized. I'll ask that in a separate question.
Try to call
getOffsetHeight()
andgetOffsetWidth()
methods on correspondingFlexTable
.