<vizinfo>.add

Add an item to the info box

 

<vizinfo>.add(
    what    
    label = ''    

)

 

what

An item to add to the info box. Can be one of the following values:

viz.SLIDER
viz.BUTTON
viz.CHECKBOX
viz.RADIO
viz.TEXQUAD


label = ''

A text label that will appear to the left of the item.


Remarks

This command will add an additional item to the info box. The item can also contain a label which will appear to the left of it. Once an item is added you can access its label through the variable name "label". See the example below for more details.

Return Value

The new item

Example

import vizinfo

info = vizinfo.add('Options')

#Add some GUI items to the info box
slider = info.add(viz.SLIDER,'A slider:')
button = info.add(viz.BUTTON,'A button:')
checkbox = info.add(viz.CHECKBOX,'A checkbox')
radio = info.add(viz.RADIO,0,'A radio button:')
#Make the label for the slider red
slider.label.color(viz.RED)