On Sep 17, 11:13 am, HenrikA <[email protected]> wrote:
> Making HTML content blend into your application using Frames worked
> well inn all browsers except IE8 (and older ?) where getting rid of
> the frame borders turned out to be quite tedious.
>
> We first resolved it by creating our own IFrame widget, but then
> resolved it by just extending the Frame class.
> The problem is that IE8 requires the frameborder to be set prior to
> attachment, and Frame does not have any methods to manipulate this.
> The solution:
How about the following? wouldn't it work too?
// would work equally well with NamedFrame
Frame f = new Frame(url);
// those 5 lines could be moved into a utility method
"ensureBorderLessFrame(Frame)"
IFrameElement ife = IFrameElement.as(f.getElement());
ife.setMarginHeight(0);
ife.setMarginWidth(0);
ife.setFrameBorder(0);
ife.setAttribute("framespacing","0");
// size really shouldn't be set by the widget itself
f.setSize("100%", "100%");
// now you can add it to any panel you like:
container.add(f);
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.