How do I get the height of a GWT object in pixels? I am trying to find a getHeight method or something similar..
+4
A:
You are probably looking for getOffsetHeight()
(inherited by every part of the UI from UiObject
):
Gets the object's offset height in pixels. This is the total height of the object, including decorations such as border, margin, and padding.
There's also the getClientHeight()
from Element
:
Returns the inner height of an element in pixels, including padding but not the horizontal scrollbar height, border, or margin.
You can access the underlying Element of every UiObject (meaning Widgets, etc) via the getElement()
method.
Igor Klimer
2010-03-26 10:29:08