-- J.
Am Donnerstag, 20. Dezember 2012 22:54:55 UTC+1 schrieb markww:
-- Am Donnerstag, 20. Dezember 2012 22:54:55 UTC+1 schrieb markww:
Hi,I'm using firefox 17. I'm trying to measure the width of a FlowPanel instance. It seems to always be off by about 5 or 6 pixels. I'm doing it like this:FlowPanel fp = new FlowPanel();fp.getElement().getStyle().fp.getElement().getStyle().setProperty("maxWidth", 300); setProperty("fontSize", 18); fp.getElement().setInnerText("hello"); RootPanel.get().add(fp);int width = fp.getOffsetWidth(); // <-- not accurateIs this not the correct way to do it? Is there some additional layout pass that happens after adding a panel which alters its size?
Thanks
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wiBiLAEXm0wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment