View Single Post
  #2  
Old 01-10-2012, 02:17 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Within the slider callback you can compute the nearest defined point and move the tick to it. Example:
Code:
import viz
import vizact
viz.go()

slider = viz.addSlider(pos=(0.5,0.1,0))

SLIDER_STEPS = 10

def UpdateSlider(pos):
	val = round(SLIDER_STEPS*pos) / float(SLIDER_STEPS)
	slider.set(val)
vizact.onslider(slider,UpdateSlider)
Reply With Quote