see Zvon XUL reference for many more examples
Click on the name of the file, e.g. xul1.xul to see the example. While sources can be browsed with any browser, to see the examples Mozilla browser is required. These examples were tested with M12 release. There are still some bugs creeping which will be doubtlessly removed in future releases.| Example 1 | The window element is the root element of xul files. The xmlns attrinute defines the default namespace the basic tags belongs to. It must be always present. The meaning of the element menubar is obvious, the elements menu define individual menubar items. The value of attribute value appears as the name of the given item. |
|---|---|
| Example 2 | With the combination of elements menu menupopup, and menuitem arbitrary menubars can be created. |
| Example 3 | Several menuitems can be grouped together. The menuitems in the same group has the same value of name attribute. The click on the menu item selects it. The further behaviour depends on the value of type attribute. |
| Example 4 | The menubar is used to trigger some action. The oncommand attribute is used to specify the required behaviour in javascript (ECMAscript). |
| Example 5 | Some menu items can be disabled by setting the disabled attribute to the value true. |
| Example 6 | Visual effects are accomplished with the help of CSS |
| Example 7 | The element progressmeter displays a progressmeter which can be set to a position by value attribute. If the position is not known this element can be set to undetermined value by mode attribute with value "undetermined" |
| Example 8 | The box element is used to group controls together. Its align attribute decides if these controls go from left to right ("horizontal") or top to bottom ("vertical"). With titledbutton element highly customizable buttons can be created. The value attribute sets the text for the button. The picture can be specify either by src attribute or by setting list-style-image property in CSS. |
| Example 9 | The element tabcontrol enables switching between different views. There is one to one correspondence between children of tabbox and tabpanel. It means that the click on the first tab opens the view defined by the first child of tabpanel, the second tab opens the second child of tabpanel and so on. |
| Example 10 | The tree element is roughly equivalent to html table. The tree tables support multiple selections (with help of Ctrl and Shift keys). |
| Example 11 | The html code can be used in xul files. If it is needed html namespace must be defined precisely as shown in the examples with xmlns:html attribute. |