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().setProperty("maxWidth", 300);
fp.getElement().getStyle().setProperty("fontSize", 18);
fp.getElement().setInnerText("hello");
RootPanel.get().add(fp);
int width = fp.getOffsetWidth(); // <-- not accurate
Is 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