Thanks for your email Preet- I tried what you describe before hitting the list, but the contentWindow stubbornly reported its size as that of the outer window rather its own contents. In the end what worked was pulling the offset height & width directly from the content itself and then sizing everything up based on that.

-Bill

On Jun 11, 2007, at 3:42 PM, Preet Shihn wrote:

you can find the full size of the content in the window to be:
width = contentwindow.innerWidth + contentwindow.scrollMaxX
height = contentwindow.innerHeight + contentwindow.scrollMaxY

then you can resize your xul window to wdth/height.
If your browser flex is set to 1, the browser will adjust accordingly.

You might have to give some margin to the width and height to deal with any window/browser borders

- Preet

On 6/10/07, Bill Orcutt <[EMAIL PROTECTED]> wrote:
Hi-

I have a window that contains a browser element and an onload routine
that would like to size the outer xul window to fit the content
contained in the inner browser window. The browser element has an
attribute of flex=1. Calling sizeToContent on the xul window
collapses it to nothing. Also tried calling sizeToContent on the
contentWindow of the browser, but that seems to have no effect.  Has
anyone found a way to do this?

thanks

-Bill
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to