Visit Mozilla.org

Sandbox:XUL:tabbox

From MDC

Contents

[edit] Summary

Image:XUL_cheat_tabs.gif

A container used to display tabbed pages of elements to the user. The tabbox consists of two parts, the tab strip which appears along the top, and the panels below. The user may press one of the tabs on the tab strip to display the corresponding panel. Only one panel is displayed at a time. The tabstrip is created using a <tabs> element, while the panels are enclosed in a <tabpanels> element. The <tabs> element and the <tabpanels> element are normally children of the <tabbox>, however, these elements do not have to be direct children. The <tabbox> is a type of box that defaults to vertical orientation.

The DOM:element:selectedIndex attribute or property of the tabbox may be used to programmatically change which panel is displayed.

The <tabbox> element implements the following interfaces: nsIAccessibleProvider

[edit] Attributes

eventnode, handleCtrlPageUpDown, handleCtrlTab

[edit] Properties and Methods

accessible, eventNode, handleCtrlPageUpDown, handleCtrlTab, selectedIndex selectedPanel, selectedTab

[edit] Example

Image:tabpanel1.jpg
<tabbox>
  <tabs>
    <tab label="Mail"/>
    <tab label="News"/>
  </tabs>
  <tabpanels>
    <tabpanel id="mailtab">
      <checkbox label="Automatically check for mail"/>
    </tabpanel>
    <tabpanel id="newstab">
      <button label="Clear News Buffer"/>
    </tabpanel>
  </tabpanels>
</tabbox>

[edit] See also

Tabbox on the XUL Tutorial

[edit] User Contributed Notes