cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Apr 26, 2011 12:22 am Post subject: "Deep Magic" slider control |
|
|
Dug up some deep old magic.
Updated like twice. New, improved.
Please see http://www.vdsworld.com/forum/viewtopic.php?t=45
Code: |
rem -- VDS3 & VDS4 compatible? VDS 5 compatible --
rem -- Move elements using the undocumented DESIGN style --
wait 1
rem wait 1 not necessary when compiled.
OPTION SCALE, 96
Title Credit to Mac
DIALOG CREATE,Slide Example,-1,0,600,420,DESIGN,CLICK
dialog add,group,group1,200,200,200,200,Move me.,,CROSS
dialog add,radio,radio1,220,220,100,50,Option 1
DIALOG ADD,group,B1,0,100,5,400,"",,HSPLIT
dialog add,text,text1,10,@diff(@dlgpos(b1,l),25),,,Hi
dialog add,text,text2,10,@sum(@dlgpos(b1,l),25),,,there
dialog add,status,status1
DIALOG SHOW
:click
:timer
%%s = @succ(%%s)
dialog set,status1,@dlgpos(b1,l) %%s
:EVLOOP
wait event,1
goto @event()
:B1CLICK
DIALOG ATTACH, B1
goto evloop
:B1CHANGE
if @greater(@dlgpos(b1,l),540)
dialog setpos,b1,0,539,5,400
end
if @not(@equal(@dlgpos(b1,w),5))
dialog setpos,b1,0,@dlgpos(b1,l),5,400
end
if @not(@equal(@dlgpos(b1,t),0))
dialog setpos,b1,0,@dlgpos(b1,l),5,400
end
if @greater(30,@dlgpos(b1,l))
dialog setpos,b1,0,31,5,400
end
dialog setpos,text1,10,@diff(@dlgpos(b1,l),25)
dialog setpos,text2,10,@sum(@dlgpos(b1,l),25)
dialog detach,b1
rem dialog setpos,text1,10,
goto EVLOOP
:CLOSE
EXIT
:text1click
goto evloop
:text2click
goto evloop
:group1click
dialog attach,group1
goto evloop
:group1change
dialog detach,group1
goto evloop
:radio1click
goto evloop
:status1click
goto evloop |
|
|