WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   help in radioButtons (https://forum.worldviz.com/showthread.php?t=3035)

lflc 10-20-2010 03:27 AM

help in radioButtons
 
Hi,

I am having a problem in the Radio Buttons.

I am developing a GUI in witch i am using radio buttons to select correct options, but i have a problem that i cannot solve.

In every group of radio buttons the 1st button is appears always select, but actually is not selected, the only way of selecting it is by choosing other button and then choose again the 1st button.
does anyone know how to solve this? I would like that in the begging none of he buttons appear selected, only select button after clicking on it.

Jeff 10-20-2010 11:43 AM

Try the following:
Code:

import viz
viz.go()
 
r1 = viz.addRadioButton(0)
r2 = viz.addRadioButton(0)
r3 = viz.addRadioButton(0)
r1.setPosition([.5,.6,0])
r2.setPosition([.5,.5,0])
r3.setPosition([.5,.4,0])

#make sure r1 is not selected at start
r1.set(viz.UP)

vizact.onbuttondown(r1,viz.logNotice,'r1 selected')
vizact.onbuttondown(r2,viz.logNotice,'r2 selected')
vizact.onbuttondown(r3,viz.logNotice,'r3 selected')



All times are GMT -7. The time now is 01:57 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC