View Single Post
  #14  
Old 06-13-2008, 12:05 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Is there a specific reason you don't want to use tasks? They are made for these type of cases where you want a linear flow of operations. Either way, here is how you would handle this without tasks. The code sets up a callback for the accept button and calls a function when it is clicked.
Code:
import viz
import vizdlg
viz.go()

#Create empty dialog
dlg = vizdlg.Dialog(title='Dialog title')
dlg.visible(1)

#Link dialog to center of window
viz.link(viz.CenterCenter,dlg)

#Hide dialog and add gallery when accept is pressed
def DialogAccept():
	dlg.visible(0)
	viz.add('gallery.ive')
vizact.onbuttonup(dlg.accept,DialogAccept)
Reply With Quote