Question

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?

Was it helpful?

Solution

Try to call getOffsetHeight() and getOffsetWidth() methods on corresponding FlexTable.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top