Magnus -- Try something like this:
... Widget widget = ...; Element element = widget.getElement(); int paddingTop = getComputedStyle(element,"paddingTop"); int paddingRight = getComputedStyle(element,"paddingRight"); int paddingBottom = getComputedStyle(element,"paddingBottom"); int paddingLeft = getComputedStyle(element,"paddingTLeft"); ... public static native int getComputedStyle(Element elem, String prop) /*-{ var strValue = ""; if ($doc.defaultView && $doc.defaultView.getComputedStyle) // W3C { strValue = $doc.defaultView.getComputedStyle(elem,null).getPropertyValue(prop); } else if (elem.currentStyle) // IE { strValue = elem.currentStyle[prop]; } return parseInt(strValue); }-*/; On Jan 28, 8:53 pm, Jim Douglas <jdou...@basis.com> wrote: > http://www.google.com/search?q=getComputedStyle > > On Jan 28, 7:21 pm, Magnus <alpineblas...@googlemail.com> wrote: > > > > > Hi, > > > if this is true then it's not good. :-) I thought that these methods > > operate on the DOM, and it should be transparent, where the styles of > > the DOM come from... > > > I would be glad if someone could clarify this... > > > Magnus -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.