WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-07-2011, 04:56 PM
disbeat disbeat is offline
Member
 
Join Date: Oct 2010
Posts: 36
vizdlg Panel: Add and remove

Hi,

I am developing an application with several scenes.

I created a dlg Panel, but I cannot attach it to a scene.

Also, I cannot remove it either.

How can I use the panel associated to a specific scene, and how can I remove it.


thanks
Reply With Quote
  #2  
Old 02-07-2011, 07:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
You can use the parent command to parent the panel to viz.SCREEN and specify the scene number. To remove a panel you can use the remove() command:
Code:
import viz
import vizdlg
import vizact

viz.go()

panel = vizdlg.Panel(padding=15,border=False)
panel.addItem(viz.addText('Panel for scene 2'))
panel.background.alpha(0.6)
panel.background.color(viz.BLACK)

panel.parent(viz.SCREEN,scene=2)
panel.setPosition(0.4,0.6)
panel.setScale([2,2,2])

gallery = viz.addChild('gallery.ive')
court = viz.addChild('court.ive',scene=2)

vizact.onkeydown('1',viz.scene,1)
vizact.onkeydown('2',viz.scene,2)
vizact.onkeydown('3',panel.remove)

Last edited by Jeff; 02-07-2011 at 07:22 PM.
Reply With Quote
  #3  
Old 02-08-2011, 12:44 PM
disbeat disbeat is offline
Member
 
Join Date: Oct 2010
Posts: 36
Thank you Jeff, it was very helpful.

May I ask why isn't those methods documented? Does the vizdlg Panel have a super class I am not aware of? Even so, I think that should be documented.

I leave you guys the suggestion

Once again, thank you very much!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


All times are GMT -7. The time now is 10:41 PM.


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