PDA

View Full Version : Draw order of vizinfo Panel


mape2k
08-11-2015, 05:18 AM
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, 03:24 AM
Nobody knows a solution?

Jeff
10-08-2015, 03:59 PM
You could change the vizdlg panel's drawOrder to render the panel above or below:

'''
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)