WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-29-2016, 06:20 AM
haohaoxuexi1 haohaoxuexi1 is offline
Member
 
Join Date: Sep 2015
Posts: 81
question about BUTTON_EVENT

checkbox = viz.addCheckbox(pos=(0.5,0.5,0))

def onButton(obj,state):
if obj == checkbox:
if state == viz.DOWN:
print 'Checked'
else:
pass

viz.callback(viz.BUTTON_EVENT,onButton)

checkbox2 = viz.addCheckbox(pos=(0.5,0.5,0))

def onButton1(obj,state):
if obj == checkbox2:
if state == viz.DOWN:
print 'Checked'
else:
pass

viz.callback(viz.BUTTON_EVENT,onButton1)


when i write the code as above, why is the system only execute the later BUTTON_EVENT but not both of them?

If i have two checkbox, should i put the judging condition in the same function?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
<multimedia:image>.setImageData question shivanangel Vizard 0 01-28-2014 07:43 PM
question about NVIDIA 3D vision Weihua An Vizard 5 08-02-2010 06:49 AM
how to invoke command line question billjarrold Vizard 2 01-11-2010 08:51 AM
General question and question regarding arrays dan12345 Vizard 1 01-15-2008 10:15 AM
Stereo Overlap question JMOwens Vizard 2 01-08-2008 08:54 AM


All times are GMT -7. The time now is 11:40 AM.


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