View Single Post
  #6  
Old 07-17-2014, 06:13 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
By default the visibility of the dialog components are turned off unless added to a TabPanel. When using a task function, you can use the show method to display the dialog and wait for a button event. The TickerDialog section has a short example. The following turns the visibility of the components on in a standard panel:

Code:
import viz
import vizdlg
viz.go()

# ticker dialog and standard panel
s1 = vizdlg.TickerDialog(label='Circle',units='pixels',range=(1,5,1),editable=True,border=False,background=False,margin=0)
s2 = vizdlg.TickerDialog(label='Crosshair',units='pixels',range=(1,5,1),editable=True,border=False,background=False,margin=0)
s3 = vizdlg.TickerDialog(label='Border',units='pixels',range=(1,5,1),editable=True,border=False,background=False,margin=0)
s1.visible(viz.ON)
s2.visible(viz.ON)
s3.visible(viz.ON)

row = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_BOTTOM,border=False,background=False,margin=0)
is1 = row.addItem(s1)
is2 = row.addItem(s2)
is3 = row.addItem(s3)

myPanel = vizdlg.Panel(align=vizdlg.ALIGN_CENTER)
myPanel.addItem(row)
viz.link(viz.CenterCenter, myPanel)
Thanks for the documentation comments and suggestions. Regarding the vizconfig docs, I'll make a note to add an updated image and some examples to the installation.
Reply With Quote