Question

I want to set a minimum size for my xulrunner applications' main window.I have tried minwidth and minheight but didnt work.wat am i missing out?

Was it helpful?

Solution 3

A dirty way to keep the xul window minimum size to to listen to the resize event and use window.resizeTo()

OTHER TIPS

Here is an example:

window.addEventListener("resize", function() {
    if(window.outerWidth > 100 && window.outerHeight > 100 &&
       (window.outerWidth < window.document.documentElement.minWidth ||
        window.outerHeight < window.document.documentElement.minHeight)) {

        window.resizeTo(
            window.document.documentElement.minWidth,
            window.document.documentElement.minHeight            
        );
    }
}, false);

This assumes you have the minwidth and minheight properties set on the XUL window tag.

The > 100 check is needed as the window size is 1 or 23 during loading in my case and resize fires multiple times during loading.

No, you can't.

If you don't believe me, try firefox -- it can resize to just the title bar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top