Huge Collections of Software Manuals and Knowledgebase

GreatManuals.com
Huge Collections of Software Manuals and Knowledgebase

 
Home Contact Us Request to publish your help manuals Request to remove your help manuals
Introduction
» Likno Drop-Down Menu Trees
» About Likno Software
User Interface
» Main Window Layout
» Keyboard Shortcuts
» Commands
» Command Structure
» Theme
» Tools
» Project Properties
» Customize
» Properties
Manage Trees Programmatically
» API For Programmable Trees
» API Reference
» Objects Properties
» Functions
» LiknoTreeRoot Properties
» LiknoTreeRoot Functions
» Themes
Examples
» Building Calendar Tree
» Stock Market Portfolio
» Shopping Cart Management
FAQ & Tips
» Frequently Asked Questions
» Troubleshooting
 

LiknoTreeRoot Functions

These are the functions supported by the LiknoTreeRoot object. The return type of each function, if any, is indicated underneath each function name. If the returned variable is restricted to specific values, those will be indicated in brackets next to the return type.

freeware data recovery free recovery software manuals
keystroke logger data leakage protection free mobile messaging
business solution free undelete system usb monitor

addClass

Parameters

#

name

type

description

1

name

string

The name of this class to be used internally by the tree.
Note that this will not be the name by which you can refer to this class in the rest of your HTML document.

2

styl

string

The set of CSS styles comprising this class.

Adds a new class in the set of classes used by this tree. If a class with the same name already exists in this tree, it will be replaced.

Example:

treeD = new LiknoTreeRoot("treeD", "test4", 0, 0, 0, 0, 16, true, "background-color:white; border:1px solid #330099; padding:4px;", "gif");
treeD.setImagesDir("images/ldmt/16x16/tree/");
treeD.addClass("de", "font-family:Times New Roman; font-size:12px; color:black; background-color:transparent; text-decoration:none; font-weight:normal; padding-left:4px; padding-right:4px;");
treeD.addClass("mo", "font-family:Times New Roman; font-size:12px; text-decoration:underline; color:#669900; padding-left:4px; padding-right:4px;");
treeD.addClass("se", "font-family:Times New Roman; font-size:12px; color:white; background-color:#CC6600; padding-left:4px; padding-right:4px;");

addContextMenu

Parameters

#

name

type

description

1

menuitems

array

An array of even dimension, specifying an arbitrary number of pairs of values, where even indices hold the captions for each menu item, and odd indices hold a javascript function to be called whenever the user clicks on the corresponding menu item.

Adds a context (right-click) menu to the items in the tree. The context menu will inherit the styles used by the tree by default.

Context Menu

compareLeaves

Parameters

#

name

type

description

1

leaf1

LiknoTreeElement

The first leaf to compare.

2

leaf2

LiknoTreeElement

The second leaf to compare.

Compares two leaves, based on this tree's sortOnData and sortAscending properties (if -1, a lexicographical comparison is performed).

createStylesheet

Creates the CSS <style> tag with the classes to be used by the tree. Most of the time you will not need to call this function directly, since it is called by drawTree if cssCreated is false.

deleteNode

Parameters

#

name

type

description

1

leaf

LiknoTreeElement

The node we want to delete.

Deletes a node and all its children (recursively) from the tree.

drawTree

Writes the HTML code which draws the tree on your webpage. If cssCreated is false (which is by default the first time the tree is drawn), it will also create the necessary CSS style sheet for the classes used by your tree.

getLeafById

Parameters

#

name

type

description

1

leaf

string

Specifies the name of this class to be used internally by the tree.
Note that this will not be the name by which you can refer to this class in the rest of your HTML document.

2

leafid

string

Specifies the set of CSS styles comprising this class.

Searches under leaf for a node with iid = leafid and returns it if found, otherwise returns null.

loadTreeState

Loads the tree state (expanded/collapsed branches) from the associated cookie (if any). Returns false if no cookie was found.

saveTreeState

Saves the tree state (expanded/collapsed branches) in a cookie for persistence between sessions. You will probably want to call this function when the user leaves your webpage (in your onunload event handler).

selectBranch

Parameters

#

name

type

description

1

branchid

string

Specifies the iid of the branch on which the action will be performed.

 Selects the branch specified by branchid. For more information also check on the iid format.

The following examples assume your tree is named "myTree":

  • select the second main item myTree.selectBranch("myTree_1");
  • select the third sub item of the first main item myTree.selectBranch("myTree_0_2");

sortBranchId

Parameters

#

name

type

description

1

branchid

string

Specifies the iid of the branch on which the action will be performed.

2

onData

number

A valid index in the data array or -1.

3

recursively

boolean

Indicates whether sorting will be performed on all children of this branch recursively.

4

ascending

boolean

Indicates the sorting order.

Sorts the children of the branch specified by branchid recursively if recursively is true. If onData is a valid index in the array of associated data, sorting is performed using these values, otherwise a lexicographical sorting on the content of the nodes is performed.

The onData and ascending values set the sortOnData and sortAscending properties of this tree.

toggleBranch

Parameters

#

name

type

description

1

branchid

string

Specifies the iid of the branch on which the action will be performed.

Toggles the expanded/collapsed state of the branch specified by branchid.

Home | Contact Us | Request to publish your help manuals | Request to remove your help manuals