home *** CD-ROM | disk | FTP | other *** search
- <<* Prolabe.inc *>>
-
- <<procedure GenLabelBody>>
- <<begin>>
- <<genln>>
-
- * --- This routine is called when the Labels option is chosen from the Utilities menu
-
- PROCEDURE {fileprefix}_labe
- PRIVATE savrecnum,okcancel,done
- savrecnum = RECNO()
- SAVE SCREEN TO mscreen
- choice = 3
- okcancel = 0
- done = .F.
- mreport = .F.
-
- * --- Create and activate a menu containing the label options
-
- DO WHILE .T.
- ACTIVATE WINDOW menter
- @ 0,14 TO 8,27
- @ 1,5 SAY 'Label: '
- @ 1,15 PROMPT ' Create '
- @ 3,15 PROMPT ' Modify '
- @ 5,15 PROMPT ' Print '
- @ 7,15 PROMPT ' Exit '
- MENU TO choice
- DEACTIVATE WINDOW menter
- DO CASE
-
- * --- Exit this procedure
- CASE choice = 4 .or. choice = 0
- EXIT
-
- * --- Create new label definition file
- CASE choice = 1
- << filespec( fmain,fpath,fname,fext ) >>
- filename = PUTFILE('Label File to Create:',{'}{fname}{'}+'.LBX','LBX')
- IF LEN(TRIM(filename)) <> 0
- CREATE LABEL &filename
- DEACTIVATE WINDOW ALL
- ENDIF
-
- * --- Modify an existing label definition file
- CASE choice = 2
- filename = GETFILE('LBX','Label File to Modify:')
- IF LEN(TRIM(filename)) <> 0
- MODIFY LABEL &filename
- DEACTIVATE WINDOW ALL
- ENDIF
-
- * --- Print an existing label definition file
- CASE choice = 3
- filename = GETFILE('LBX','Label File to Print:')
- IF LEN(TRIM(filename)) <> 0
- DO {fileprefix}_rprnt
- ENDIF
- ENDCASE
- ENDDO
- IF savrecnum > 0 .AND. savrecnum <= RECCOUNT()
- GOTO savrecnum
- ELSE
- GO TOP
- ENDIF
- RETURN
- <<end>> <<*prolabe.inc*>>
-
-