Re: Dialog button layout: including overlays
Neil <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
Mark Simon wrote: > I’m new to this group, so I apologise if this is the wrong forum. > > I am told > (https://developer.mozilla.org/en-US/docs/Code_snippets/Dialogs_and_Prompts) > that I can customise my own layout for dialog buttons, which I have > done as follows to include a checkbox: > > <hbox id="okcancel"> > <checkbox id="copy" label="Copy" value="1" /> > <spacer flex="1"/> > <button dlgtype="cancel"/> > <button dlgtype="accept"/> > </hbox> > > It works as expected, and, among other things, includes the checkbox > on the same row as the buttons. > > However, if move the code to a separate overlay file, and try to > include it as follows: > > <?xul-overlay href="chrome://htmltools/content/dialog/include.xul"?> > <hbox id="okcancel"/> > > it doesn’t work properly. The technique works for all other included > elements, but not this one. Depending on how I tweak things, I might > get additional vacant buttons, or buttons that don’t activate properly. > > Is there an extra or alternative step that I should use for this? Accessing XUL elements before the overlay has loaded (e.g. at the top level of a script rather than in an onload handler) has been known to cause this sort of behaviour. -- Warning: May contain traces of nuts. _______________________________________________ dev-tech-xul mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xul