WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Draw order of vizinfo Panel (https://forum.worldviz.com/showthread.php?t=5424)

mape2k 08-11-2015 04:18 AM

Draw order of vizinfo Panel
 
Hey,

how can I change the draw order of a vizinfo panel? I have a normal vizdlg panel in the background and want to overlay it with a vizinfo panel to get some participant information.

The vizinfo panel is always hidden behind the vizdlg panel. Even if I hide the background panel (alpha = 0), I cannot use the mouse or keyboard to input anything into the vizinfo panel.

Cheers,
Johannes

mape2k 10-06-2015 02:24 AM

Nobody knows a solution?

Jeff 10-08-2015 02:59 PM

You could change the vizdlg panel's drawOrder to render the panel above or below:

Code:

'''
Press 1 to set vizdlg panel above
Press 2 to set vizdlg panel below
'''

import viz
import vizinfo
import vizdlg
import vizact

viz.go()

myPanel = vizdlg.Panel(drawOrder=-10)
label = myPanel.addItem(viz.addText('This is the vizdlg panel'))
textBox_panel = myPanel.addItem(viz.addTextbox())
viz.link(viz.CenterCenter,myPanel,offset=(-100,50,0))

info = vizinfo.InfoPanel(title='This is the vizinfo panel',align=viz.ALIGN_CENTER_CENTER,icon=False)
textBox_info = info.addLabelItem('TextBox',viz.addTextbox())

def setPanelAbove():
        myPanel.drawOrder(10)

def setPanelBelow():
        myPanel.drawOrder(-10)
       
vizact.onkeydown('1',setPanelAbove)
vizact.onkeydown('2',setPanelBelow)



All times are GMT -7. The time now is 02:42 AM.

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