开发者

Change the size of a dialog box for a firefox extension?

How do I change the size of a dialog box for a firefox extenion?

In javascript onload,开发者_Go百科 I know how to call "window.sizeToContent()" for it to guess what the size should be, but does anyone know how I can change the window width and height specifically?

Thanks


If you're creating it with window.openDialog and passing it the URL of a XUL file, then you can just put it in the XUL file:

<?xml yadda yadda yadda>
<dialog xmlns="blah blah blah"
        width="100"
        height="100"
>
   ...
</dialog>


Note that setting the width and height as XUL attributes affects the outer width and height of the window. If you want to set the inner width and height then the easiest way is via the style attribute i.e. <dialog style="width: 100px; height: 100px;">

Other ways of setting the width and height include passing features to openDialog, calling resizeTo or setting outerWidth, outerHeight, innerWidth or innerHeight in script.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜