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 );
...
function myHandler( evt )
{
switch ( evt.type )
{
case "click" : alert ( evt.item.text + " was clicked" );
break;
}
}
Parameters
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. |
Returns
Type |
Description |
object |
The tree object. This allow for chaining multiple setter methods in
one single statement. |
See Also