WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-04-2015, 10:53 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, here's an example:

Code:
import viz
import vizinfo
import vizdlg
import viztask

viz.go()

dojo = viz.addChild('dojo.osgb')

info = vizinfo.InfoPanel('An InfoPanel with Dialog')
info.addSeparator()

options = [('Option 1'),('Option 2')]
dialog = vizdlg.AskDialog(options=options, title='Ask Dialog')
info.addItem(dialog)

def showdialog():
    while True:
        dialog.selection = 0
        yield dialog.show()

        if dialog.accepted:
            print 'accepted', options[dialog.selection]
        else:
            print 'cancelled'

        yield viztask.waitTime(1)

viztask.schedule(showdialog())
Reply With Quote
 

Tags
vizdlg, vizinfo


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
Draw order of vizinfo Panel mape2k Vizard 2 10-08-2015 02:59 PM
vizinfo, vizdlg related questions mape2k Vizard 4 07-27-2015 03:46 AM
check user input using vizinfo panel armo Vizard 0 01-22-2015 02:05 AM
Vizinfo box: help with aligning text Woosuk Jang Vizard 4 07-15-2010 04:01 PM
Modifying Vizinfo to Support Re-parenting Tip Gladsomebeast Vizard 0 12-16-2008 05:34 PM


All times are GMT -7. The time now is 09:07 PM.


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