Re: opendialog maximized?
Neil <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
HStiglitz wrote:
> On 6/23/2013 3:25 PM, Neil wrote:
>
>> HStiglitz wrote:
>>
>>> On 6/22/2013 11:48 AM, Neil wrote:
>>>
>>>> HStiglitz wrote:
>>>>
>>>>> Can anyone tell me if there is a way to use opendialog so that the
>>>>> windows that open up are automatically maximized?
>>>>>
>>>>> In the xul for the dialog I have:
>>>>> persist="screenX screenY width height"
>>>>>
>>>>> And in the js file for the dialog I usually have:
>>>>> window.openDialog('chrome://some.xul',"","chrome,modal,dialog=no,centerscreen,resizable,minimizable"
>>>>>
>>>>>
>>>>> ..
>>>>>
>>>>> That works ok but in order to maximize that window, I have to set
>>>>> a timeout and watch for the window opening, then maximize it. And
>>>>> it doesn't always work depending how busy the cpu is.
>>>>>
>>>>> Is there an option to have the dialog be automatically opened
>>>>> maximized? Thanks
>>>>
>>>> Try <window sizemode="maximised">
>>>> https://developer.mozilla.org/en-US/docs/XUL/Attribute/sizemode
>>>>
>>>> Of course if you want to remember if someone restores the window so
>>>> that it doesn't open maximised the next time then you should add
>>>> sizemode to the persist options.
>>>
>>> Thanks Neil. Does sizemode apply to dialogs or just windows? I
>>> can't find any examples of its use in conjunction with opendialog.
>>
>> I'm not 100% sure but I think dialogs aren't maximisable, although
>> you're passing dialog=no to openDialog, so you're getting a regular
>> maximisable window anyway.
>
> Yes, my window is maximizable on account of setting "dialog=no". So
> how would I set it to open maximized automatically so I don't have to
> click the maximize button? Is there no setting for that?
>
> I tried sizemode="maximised" in both the xul file and the js file
> without success. Thanks
Yes, that wouldn't work. Sorry for spelling it in en-GB; you'll need to
try spelling it in en-US, as per the page I linked to.
--
Warning: May contain traces of nuts.