Hi everybody The following does not work properly.Could you please help me understand the slider logic?
Code:
x[1]= Shapes.AddText(1)
Shapes.Zoom(x[1],7,7)
Shapes.Move(x[1],600,120)
For i= 2 To 12
x[i]= Shapes.AddText(i)
Shapes.Zoom(x[i],7,7)
y= Shapes.GetTop(x[i-1])
Shapes.Move(x[i],600,y+105)
y= Shapes.GetTop(x[i])
EndFor
LDControls.SliderMaximum= 2
Slider= LDControls.AddSlider(40,600,"V")
Shapes.Move(slider,500,100)
t= LDControls.SliderGetValue(slider)
Stack.PushValue("t",t)
LDControls.SliderChanged= change
Sub change
t= Stack.PopValue("t")
z= LDControls.SliderGetValue(slider)
If z>t Or z=t Then
For i= 1 To 12
Shapes.Move(x[i],600,Shapes.GetTop(x[i])-2)
EndFor
v= LDControls.SliderGetValue(Slider)
Stack.PushValue("t",v)
ElseIf z<t then
For i= 1 To 12
Shapes.Move(x[i],600,Shapes.GetTop(x[i])+2)
EndFor
v= LDControls.SliderGetValue(Slider)
Stack.PushValue("t",v)
EndIf
EndSub