![]() |
#1
|
|||
|
|||
vizdlg inside a vizinfo
Is it possible to integrate a AskDialog into an InfoPanel ?
It seems that it is possible to add a vizdlg.Panel as a simple part of the InfoPanel (Custom GUI Layout of the Vizard documentation). And as the AdkDialog is inheritating from the Dialog and then the Panel, it should be possible, but for the moment, my InfoPanel is just empty Can you help me ? it would be much easier than recreating the Askdialog inside the InfoPanel. Thanks. Stéphane |
#2
|
|||
|
|||
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()) |
![]() |
Tags |
vizdlg, vizinfo |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
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 |