Simple XUL controls are very understandable to compare the HTML to find the answer. In order to learn more about his advantages, look at some slightly complicated controls - Tab.
Before you do not use XUL, you may need a few buttons, several panels or div, plus some scripts to control, more trouble, although some third-party things can realize Tab features, such as Microsoft TabControl, But always feel inconvenient, you need to install a third party's space. I saw Tab in Xul today, I feel that this control is what we want.
First take a look at a TAB structure
- Tab Elements Go Here -
tabs>
- Tabpanel Elements Go Here -
tabpanels>
tabbox>
It is very good to understand that the Tabbox tab defines the entire Tab container. There are two sub-containers below, one is tabs, one is TabPanels, contains all the Tab buttons in the TabPanels, and all Panel display, Tab Button and Panel is One-to-one, that is, if there is 3 Tabs in Tabs, there are 3 TabPanels, and see an actual example below:
The display effect is as follows:
So Esay, So Cool
Sometimes there is more content in tabpaner, you can also be divided into multiple XUL pages to edit
Tabbutton.xul
XML Version = "1.0"?> xml-stylesheet href = "chrome: // global / Skin /" TYPE = "text / css"?>
xul-overlay href = "tab1.xul"?> xul-overlay href = "tab2.xul"?>
Tab1.xul
Xml Version = "1.0"?> Xml-stylesheet href = "chrome: // global / skin /" type = "text / css"?>
Tab2.xul