HList
From Daxipedia
Contents |
[edit] Overview
[edit] Description
Hierarchical list.
Keyboard shortcuts are supported to navigate the hList.
[edit] Calls and Properties
[edit] HList
[edit] create new HList
Create new HList. Command will return a reference to the newly created list. Use this reference to insert the hierarchical list into the HTML element.
Syntax:
// create new list myHList = new HList(); // insert the list into the html element htmlElement.appendChild (myHList.dom);
[edit] .move - movelist item
Move the item at index_from to just before the item at index_to.
Parameters:
- index_from
- index_to
Syntax:
myHList.move (index_from, index_to);
[edit] .refresh - update visual elements
Update HList graphics. Call this function when adding or removing items to insure proper visual rendering.
Syntax:
myHList.refresh();
[edit] .remove - delete list item
Remove list item.
Parameters:
- index - position of the item
Syntax:
myHList.remove(index);
[edit] .rename - rename list item
Rename list item label.
Parameters:
- newLabel - new item label
- index - position of the rename item
Syntax:
myHList.rename (newLabel, index);
[edit] HList Item
[edit] create new HList item
Create a new list item.
Parameters (optional):
- label - list item label
- image url - url of the background image
- index - position of the new item
Returns:
- reference to the new list item
Syntax:
myHListItem = myHList.insert (label, image url, index);
[edit] .attach - attach a sublist
Attach a list as a sublist to the item.
Syntax:
myHListItem.attach(myOtherList);
[edit] .expand - expand or collapse list item
Expand or collapse list item.
Syntax:
myHListItem.expand();
[edit] Mouse event for label click
To set the javascript action for label click, use the following template:
Syntax:
myHListItem.label.onclick = function (parameters) {
// code that executes when hlist item label is clicked on
}
