Notifications
Clear all

[Closed] MAXScript slider question

i made slider for one of my GUI’s…but i have some doubts regarding the sliding…

how can i make the the slider snap to each ticks??

how can i change something when the slider is snapping to each ticks??

rollout slide ""
(
	slider slide "Slider" ticks: 5
	label lbl "Tick I"
   
	local lbltext = #("Tick I", "Tick II", "Tick III", "Tick IV", "Tick V", "Tick VI")
)

createdialog slide

for example in this GUI i want the label to change when the slider snaps to the each tick

4 Replies
rollout slide ""
(
	slider slide "Slider" range:[1,6,1] type:#integer ticks:5
	label lbl "Tick I"
	local lbltext = #("Tick I", "Tick II", "Tick III", "Tick IV", "Tick V", "Tick VI")
	on slide changed val do lbl.text = lbltext[val]
)
createdialog slide
1 Reply
(@patriculus)
Joined: 11 months ago

Posts: 0

Thank you Bobo…this is what i wanted…

rollout MyRollout "SliderTest" 
rollout MyRollout "SliderTest" 
(
	slider MySlider "Slider" 
	on MySlider changed val do
	(
	  print val
	)
)
createdialog MyRollout

This will help.

Sorry for the repeating, first answer showed up after i submitted