RasterTree.setEventHandler( [eventHandler] )

Specifies an event handler to be notified of tree events. The following example shows a basic event handler:
var tree = new RasterTree("myDiv", ICONS16.COMPUTER, "My Computer");
tree.setEventHandler( myHandler );  //assign event handler


function myHandler( evt )
    switch ( evt.type )
       case "click"    : alert ( evt.item.text + " was clicked" );


Name Type   Description
eventHandler function optional Callback function to be notified of events in the tree. Set to null to remove any previously set event handler.


Type Description
object The tree object. This allow for chaining multiple setter methods in one single statement.

See Also

Home Examples Download License
Copyright © 2010-2017 Edwin R. López