View Single Post
  #3  
Old 04-14-2016, 03:00 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
The following code adds a line to mark the panel as dirty and recompute the layout. Does this work the way you would expect?

Code:
import viz, vizinfo, vizact

viz.go()

ip = vizinfo.InfoPanel('', icon=False, align=viz.ALIGN_CENTER)
text = ip.addItem(viz.addText('hi'), fontSize=18, align=viz.ALIGN_CENTER_CENTER)
panel = ip.getPanel()

def setMessage():
	text.message('this is a looooooooong line')
	panel.dirtyLayout()

vizact.onkeydown(' ', setMessage)
Reply With Quote