home *** CD-ROM | disk | FTP | other *** search
- *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤
- *⌐ª Program: EXP8_7.PRG ⌐ª
- *⌐ª Function: ╩╣╙├╬▐╧▀░┤┼ñ Radio Buttons ╡─╖╢└² ⌐ª
- *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
- SET TALK OFF
-
- PUSH KEY CLEAR
- ON KEY LABEL F2 DO moving
- DEFINE WINDOW editwin FROM 2,2 TO 22,77 ;
- TITLE " [F2]: ╝╟┬╝╦┘▓Θ▓╦╡Ñ" ;
- DOUBLE;
- GROW ;
- FLOAT ;
- ZOOM ;
- SHADOW;
- COLOR SCHEME 8
- IF EMPTY(DBF())
- DIMENSION dataarray(128)
- dataarray(1) = SYS(2000,"*.DBF")
- FOR i=2 TO 128
- dataarray(i) = SYS(2000,"*.DBF",1)
- IF LEN(ALLTRIM(dataarray(i))) = 0
- EXIT
- ENDIF
- ENDFOR
- STORE 1 TO choice
- @ 5,25 MENU dataarray,i,10 ;
- TITLE "<<╟δ╤í╚í╩²╛▌┐Γ>>" ;
- SHADOW;
- COLOR SCHEME 5
- READ MENU TO choice
- IF choice = 0 && ░┤ [ESC] ╝ⁿ
- POP KEY
- RETURN
- ELSE
- USE (dataarray(choice))
- ENDIF
- ENDIF
- CHANGE NOAPPEND NODELETE NOEDIT WINDOW editwin
- CLEAR WINDOWS
- POP KEY
-
- PROCEDURE moving
- PRIVATE FILE,lastobj,enter,TAB,shifttab,up,down,LEFT,RIGHT
- PRIVATE winname
- winname = SYS(2015)
- DEFINE WINDOW (winname) FROM 9, 17 TO 19,61 ;
- FLOAT NOCLOSE SHADOW
-
- * ╢¿╥σ╕≈ LASTKEY() ╓╡╡─▒Σ┴┐, ╠ß╕▀│╠╨≥╡─╥╫╢┴╨╘
- enter = 13
- TAB = 9
- shifttab = 15
- up = 5
- down = 24
- RIGHT = 4
- LEFT = 19
- lastobj = 1
-
- ACTIVATE WINDOW (winname)
- @ 1,3 GET radio PICTURE '@*RVN ╩╫╝╟┬╝;─⌐╝╟┬╝;╝╟┬╝║┼;╠° ╫¬' ;
- SIZE 1,10,1 DEFAULT 1 WHEN radwhen() VALID radvalid()
- @ 5,15 GET recordnum SIZE 1,8 DEFAULT 0 ;
- FUNCTION 'Z' WHEN recwhen() VALID recvalid() DISABLE
- @ 7,15 GET skipnum SIZE 1,8 DEFAULT 0 ;
- FUNCTION 'Z' WHEN skipwhen() DISABLE
- @ 3,29 GET okcancel PICTURE '@*VT \!╓┤ ╨╨;\?╚í ╧√' ;
- SIZE 1,10,2 DEFAULT 0 WHEN okwhen() VALID okvalid()
- READ CYCLE
- RELEASE WINDOWS (winname)
- RETURN
-
- FUNCTION radwhen
- IF _CUROBJ = OBJNUM(radio)+3 ;
- AND radio = OBJNUM(radio)+2 ;
- AND lastobj = OBJNUM(radio)+2 ;
- AND (LASTKEY() = enter OR LASTKEY() = TAB ;
- OR LASTKEY() = down OR LASTKEY() = RIGHT)
- _CUROBJ = OBJNUM(recordnum)
- lastobj = OBJNUM(recordnum)
- RETURN
- ENDIF
-
- IF _CUROBJ = OBJNUM(radio)+2 AND radio = OBJNUM(radio)+2 ;
- AND lastobj = OBJNUM(radio)+3 AND (LASTKEY() = shifttab ;
- OR LASTKEY() = LEFT OR LASTKEY() = up)
- lastobj = _CUROBJ
- _CUROBJ = OBJNUM(recordnum)
- RETURN
- ENDIF
- lastobj = _CUROBJ
-
- FUNCTION radvalid
- DO CASE
- CASE radio = 1 OR radio = 2
- STORE 0 TO recordnum,skipnum
- SHOW GET recordnum disabled
- SHOW GET skipnum disabled
- CASE radio = 3
- STORE 0 TO skipnum
- SHOW GET recordnum enabled
- SHOW GET skipnum disabled
- _CUROBJ = OBJNUM(recordnum)
- CASE radio = 4
- STORE 0 TO recordnum
- SHOW GET recordnum disabled
- SHOW GET skipnum enabled
- _CUROBJ = OBJNUM(skipnum)
- ENDCASE
-
- FUNCTION recwhen
- IF lastobj = OBJNUM(radio)+3 AND (LASTKEY() = TAB ;
- OR LASTKEY() = down OR LASTKEY() = RIGHT)
- _CUROBJ = OBJNUM(okcancel)
- RETURN
- ENDIF
-
- IF lastobj = OBJNUM(okcancel) AND (LASTKEY() = shifttab ;
- OR LASTKEY() = up OR LASTKEY() = LEFT)
- _CUROBJ = OBJNUM(radio)+3
- RETURN
- ENDIF
- lastobj = _CUROBJ
-
-
- FUNCTION recvalid
- IF !MDOWN() AND (LASTKEY() = enter OR LASTKEY() = TAB ;
- OR LASTKEY() = down OR LASTKEY() = RIGHT)
- _CUROBJ = OBJNUM(radio)+3
- RETURN
- ENDIF
-
- IF !MDOWN() AND (LASTKEY()= shifttab ;
- OR LASTKEY() = up OR LASTKEY() = LEFT)
- _CUROBJ = OBJNUM(radio)+2
- ENDIF
-
- FUNCTION skipwhen
- lastobj = _CUROBJ
-
- FUNCTION okwhen
- lastobj = _CUROBJ
-
- FUNCTION okvalid
- IF okcancel = 1
- DO CASE
- CASE radio = 1
- GO TOP
- CASE radio = 2
- GO BOTTOM
- CASE radio = 3
- DO CASE
- CASE recordnum > RECCOUNT()
- GO BOTTOM
- CASE recordnum < 0
- GO TOP
- OTHERWISE
- GO recordnum
- ENDCASE
- CASE radio = 4
- DO CASE
- CASE skipnum+RECNO() > RECCOUNT()
- GO BOTTOM
- CASE skipnum+RECNO() < 0
- GO TOP
- OTHERWISE
- SKIP skipnum
- ENDCASE
- ENDCASE
- ELSE
- CLOSE ALL
- ENDIF
- RETURN