<vizact>.onlist

Register a function to handle events from a drop down list

 

<vizact>.onlist(
    droplist    
    func    
    *args    

)

 

droplist

A droplist object


func

The function to call when the droplist selection changes


*args

The arguments to pass to the function


Remarks

The function will be called when a new selection is made for the drop down list. The first argument passed to the callback func is an event object that has a newSel attribute.

Return Value

An EventFunction object.

Example

droplist = viz.addDropList( options=['Hello','World'] , pos=(0.5,0.5,0) )
def dropListChanged(e):
    print e.object.getItem(e.newSel)
vizact.onlist( droplist, dropListChanged )