View Single Post
  #5  
Old 06-25-2008, 11:37 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Hello,

I was trying by using nested if loop:

aRadio = QuestionBox.add(viz.RADIO, 0, "A. 1")
bRadio = QuestionBox.add(viz.RADIO, 0, "B. 2")
cRadio = QuestionBox.add(viz.RADIO, 0, "C. 3")
OKbutton = QuestionBox.add(viz.BUTTON, "OK")
def onKeyDown(key):
if key == 'A':
if key == 'D':
print 'abcd'
viz.callback(viz.KEYDOWN_EVENT,onKeyDown)

Here, A is my first option and D is my OK button. So, what I want is if the user presses A and subsequently D (i.e. OK button), I must print something say 'abcd'.

Are there further options available for consecutive keyboard entries?

Thanks

Uttama
Reply With Quote