문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top