HList

From Daxipedia

Jump to: navigation, search


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:

  1. index_from
  2. 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:

  1. index - position of the item

Syntax:

myHList.remove(index);

[edit] .rename - rename list item

Rename list item label.

Parameters:

  1. newLabel - new item label
  2. 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):

  1. label - list item label
  2. image url - url of the background image
  3. index - position of the new item

Returns:

  1. 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
}

[edit] Technical Details

[edit] How does it work?

[edit] Known issues

Personal tools