XUL:tabs
From MDC
« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]
A row of tabs. A tabs element should be placed inside a tabbox and should contain tab elements.
More information is available in the XUL tutorial.
- Attributes
- closebutton, disableclose, disabled, onclosetab, onnewtab, onselect, setfocus, tabindex, tooltiptextnew, value,
- Properties
- accessibleType, disabled, itemCount, selectedIndex, selectedItem, tabIndex, value,
[edit] Examples
(example needed)
[edit] Attributes
|
Inherited from XUL element |
- closebutton
- Type: boolean
- If this attribute is set to
true, the tabs row will have a "new tab" button and "close" button on the ends. This feature is used by the tabbrowser to provide the facilities for adding and closing tabs. You can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively.
- disableclose
- Type: boolean
- If this attribute is
truethe close button will be disabled.
- disabled
- Type: boolean
- Indicates whether the element is disabled or not. If this element is set to
truethe element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and thecommandevent will not fire.
- onclosetab
- Type: script code
- This script will be called when the close tab button is clicked.
- onnewtab
- Not in Firefox
- Type: script code
- This script will be called when the new tab button is clicked.
- onselect
- Type: script code
- This event is sent to the tabs element when this tab is changed.
- setfocus
- Type: boolean
- If
trueor omitted, the focus will be given to the first element in the corresponding tabpanel when the tabs are navigated via the keyboard. If this attribute isfalse, the focus does not change during navigation.
- tabindex
- Type: integer
- The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher
tabindexare later in the tab sequence.
- tooltiptextnew
- Not in Firefox
- Type: string
- Used to set the text which appears in the tooltip when the user moves the mouse over the new button in the tab row.
[edit] Properties
|
Inherited from XUL element Inherited from DOM element |
- accessibleType
- Type: integer
- A value indicating the type of accessibility object for the element.
- selectedIndex
- Type: integer
- Returns the index of the currently selected item. You may select an item by assigning its index to this property. By assigning
-1to this property, all items will be deselected.
- selectedItem
- Type: element
- Holds the currently selected item. If no item is currently selected, this value will be
null. You can select an item by setting this value. A select event will be sent to the element when it is changed either via this property, the selectedIndex property, or changed by the user.
[edit] Methods
|
Inherited from XUL element Inherited from DOM element |
- advanceSelectedTab( dir, wrap )
- Return type: no return value
- If the argument dir is set to
1, the currently selected tab changes to the next tab. If the argument dir is set to-1, the currently selected tab changes to the previous tab. If the wrap argument istrue, the adjustment will wrap around when the first or last tab is reached.
- appendItem( label, value )
- Return type: element
- Creates a new item and adds it to the end of the existing list of items. You may optionally set a value. The function returns the newly created element.
- getIndexOfItem( item )
- Return type: integer
- Returns the zero-based position of the specified item. Items are numbered starting at the first item displayed in the list.
- getItemAtIndex( index )
- Return type: element
- Returns the element that is at the specified index.
- insertItemAt( index, label, value )
- Return type: element
- This method creates a new item and inserts it at the specified position. You may optionally set a value. The new item element is returned.
- removeItemAt( index )
- Return type: element
- Removes the child item in the element at the specified index. The method returns the removed item.
[edit] Related
- Elements
- tabbox, tab, tabpanels, tabpanel.
- Interfaces
- nsIAccessibleProvider, nsIDOMXULSelectControlElement