Vizard 8 » Command Index » Vizard modules » viz » <viz>.addRadioButton
8.0

<viz>.addRadioButton

Adds radio buttons to the specified group.

<viz>.addRadioButton(  
group  
scene = viz.MainScene  
parent = viz.SCREEN  
)  
group
The group name the radio button belongs to.
scene = viz.MainScene
If the parent is viz.WORLD or viz.SCREEN, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.
parent = viz.SCREEN
viz.WORLD
viz.SCREEN
viz.ORTHO
<node3d> object

Remarks

Only one radio button per group can be selected at a time. When a radio button is selected it will generate a viz.BUTTON_EVENT

Return Value

<node3d:GUI:button> object

Example

r1 = viz.addRadioButton(0)
r2 = viz.addRadioButton(0)
l1 = viz.addRadioButton(1)
l2 = viz.addRadioButton(1)
r1.setPosition([.75,.75,0])
r2.setPosition([.75,.25,0])
l1.setPosition([.25,.75,0])
l2.setPosition([.25,.25,0])

See also

<viz>.addButton
<viz>.addButtonLabel
<viz>.addCheckbox
<viz>.addDropList
<viz>.addProgressBar
<viz>.addSlider
<viz>.addText
<viz>.addTextbox