开发者

how to learn size of absolute panel in gwt

开发者 https://www.devze.com 2023-03-30 16:45 出处:网络
I can set width or height of an AbsolutePanel via setWidth() setHeight() methods, but there are no getWidht() or getHeight() methods. How can I get width or height after setting 开发者_运维技巧it?

I can set width or height of an AbsolutePanel via setWidth() setHeight() methods, but there are no getWidht() or getHeight() methods. How can I get width or height after setting 开发者_运维技巧it?

Thanks in advance


Use getOffsetHeight() and getOffsetWidth(). Be aware that these values include any padding or border present on the element.

You can also use Element#getClientWidth() or Element#getClientHeight(), which won't include borders.

0

精彩评论

暂无评论...
验证码 换一张
取 消