View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Dec 24, 2002 6:31 am Post subject: Side Spin Element |
|
|
Hiya! My partner doesn't like normal spin elements, he complained that the buttons should be on the side. Ever want to talk about picky.
Code: | rem Menu not neccessary if you want more than one spin, or you could event code for it.
title Side Spin
DIALOG CREATE,Side Spin,-1,0,240,160
DIALOG ADD,BUTTON,BUTTON1,0,0,20,17,<<
DIALOG ADD,EDIT,EDIT1,0,20,30,17,20
DIALOG ADD,BUTTON,BUTTON2,0,50,20,17,>>
DIALOG ADD,EDIT,EDIT2,0,0,0,0
DIALOG ADD,MENU,-,Left|Left,Right|Right
DIALOG SHOW
%A = @sendmsg(@win(~EDIT1),$0CF,1,0)
dialog focus,edit2
:timer
%%check = @sendmsg(@win(~BUTTON1),$0F2,0,0)
if @equal(%%check,108)@equal(%%check,104)
dialog set,edit1,@pred(@dlgtext(edit1))
else
end
%P = @sendmsg(@win(~BUTTON2),$0F2,0,0)
if @equal(%P,108)@equal(%P,104)
dialog set,edit1,@succ(@dlgtext(edit1))
else
end
:evloop
wait event,.1
%e = @event()
goto %e
:button1button
dialog focus,edit2
goto evloop
:button2button
dialog focus,edit2
goto evloop
:leftmenu
dialog set,edit1,@pred(@dlgtext(edit1))
goto evloop
:rightmenu
dialog set,edit1,@succ(@dlgtext(edit1))
goto evloop
:close
exit
|
NodNarb |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Dec 24, 2002 9:52 pm Post subject: Side Spin Element Update |
|
|
My friend is never satisfied. This is kind of a good thing...here's an update.
Code: |
rem Menu not neccessary if you want more than one spin, or you could event code for it.
title Side Spin
DIALOG CREATE,Side Spin,-1,0,240,160
DIALOG ADD,EDIT,EDIT1,2,0,71,19," "20
DIALOG ADD,BUTTON,BUTTON1,5,2,20,14,<<
DIALOG ADD,BUTTON,BUTTON2,5,48,20,14,>>
DIALOG ADD,EDIT,EDIT2,0,0,0,0
DIALOG ADD,MENU,-,Left|Left,Right|Right
DIALOG SHOW
%A = @sendmsg(@win(~EDIT1),$0CF,1,0)
dialog focus,edit2
:timer
%%check = @sendmsg(@win(~BUTTON1),$0F2,0,0)
if @equal(%%check,108)@equal(%%check,104)
dialog set,edit1," "@pred(@dlgtext(edit1))
else
end
%P = @sendmsg(@win(~BUTTON2),$0F2,0,0)
if @equal(%P,108)@equal(%P,104)
dialog set,edit1," "@succ(@dlgtext(edit1))
else
end
:evloop
wait event,.01
%e = @event()
goto %e
:button1button
dialog focus,edit2
goto evloop
:button2button
dialog focus,edit2
goto evloop
:leftmenu
dialog set,edit1," "@pred(@dlgtext(edit1))
goto evloop
:rightmenu
dialog set,edit1," "@succ(@dlgtext(edit1))
goto evloop
:close
exit
|
NodNarb |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|