[Project_owners] Dialog question.

Jaap A. Haitsma jaap at haitsma.org
Sun Feb 1 16:30:05 EST 2004


Hi,

I'm trying to change one of my dialogs. Sofar unsuccesfully.

Basically I want a dialog with a Yes and No button below some text 
asking a question.
I have the following code up till now (there are some linewraps due to 
my or your email program)
--------------------------------------------
<dialog id="accept_postdata" title="Warning!!!!!!!!!!!!"
 
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         buttons="none">

<vbox>
<description>Are you really sure that want to enable Reload 
Every?</description>

<hbox align="center">
<button label="Yes" oncommand="window.arguments[0](true);acceptButton();" />
<button label="No" oncommand="window.arguments[0](false);cancelButton()" />

</hbox>

</vbox>
</dialog>
----------------------------------------------------
I have the following questions:

1. I do not want the the Accept and Cancel button. If I leave out the 
buttons property of dialog, I still get them. I now set buttons="none". 
This works but it is not documented anywhere. What's the official way??

2. I want Yes and No to appear in the center (middle) of the dialog.
How do I get this to work. I already used align halign valign box-align, 
but still no buttons in the middle :-(

3. acceptButton() and cancelButton() should do the same as the accept 
and cancel buttons and close the dialog. However my dialog does not get 
closed. :-(

Thanks,

Jaap


More information about the Project_owners mailing list