home *** CD-ROM | disk | FTP | other *** search
- $Screen
- Remarks
- ────────────────────────────────────────────────────────────────────────────
- Note- by declaring this a SCREEN I can add comments to the top of this
- subroutine. That is the only purpose of this "Screen"
- ────────────────────────────────────────────────────────────────────────────
- My apologies to whomever wrote this up in the Microrim exchange
- sometime in the middle of 1990 (or was it 1989?). They deserve the credit;
- --> What I've discovered is that these routines will compile very well.
- --> These may also be used as a CUSTOM in applications express!
- ────────────────────────────────────────────────────────────────────────────
- HELPSET initializes the [f1] key as an additional HELP key. The [f10] is
- inaffected, and will ALSO work as the HELP key for users with that
- keystroke memorized.
- HELPEND tidies up when you exit your routine.
- ────────────────────────────────────────────────────────────────────────────
- There are 3 additional routines:
- Arrows - redefines up- and down-arrow keys
- ArrowESC - redefines up- and down-arrow keys AND the Enter key
- EndArrow - returns all keys to their origional use
- ────────────────────────────────────────────────────────────────────────────
- Sample use with a TIERed form:
- Run Arrows in vANSI.SUB
- EDIT using (formname)
- Run EndArrow in vANSI.SUB
- ────────────────────────────────────────────────────────────────────────────
- DYNAMIC MENUING
- Sample use with a TIERed form used like a menu:
- Run ArrowESC in vANSI.SUB
- EDIT using (formname)
- Run EndArrow in vANSI.SUB
- I call this technique "Dynamic Menuing", and is marvelous!
- It replaces this technique:
- "out filespec"
- "sel column from table"
- "out screen"
- "Choose var from filespec"
- and overcomes the built-in size limitations with the choose command.
- ────────────────────────────────────────────────────────────────────────────
- $Command
- HelpSet
- *(┌─────────────────────────────────────────────────────────────┐)
- *(│ This reassigns HELP in RBase 2.11 - THIS WILL COMPILE! │)
- *(│ Change [f1] key to work like [f10]. │)
- *(│ 0;59 = [F1] 0;68 = [f10] │)
- *(└─────────────────────────────────────────────────────────────┘)
- Output CON
- Set Variable vANSI TEXT
- Set Variable vANSI to (CHAR(27)+ "[0;59;0;68p")
- Show Variable vANSI at 8 5
- Clear vANSI
- Output Screen
- RETURN
- $Command
- HelpEnd
- *(┌─────────────────────────────────────────────────────────────┐)
- *(│ Return REDFINED keys back to their origional function. │)
- *(│ Uhhh.. "Zero out [HELP] key." │)
- *(└─────────────────────────────────────────────────────────────┘)
- Output CON
- Set Variable vANSI TEXT
- Set Variable vANSI to (CHAR(27)+ "[0;59;0;59p")
- Show Variable vANSI at 8 5
- Clear vANSI
- Output Screen
- Return
- $Command
- Arrows
- *(╔═════════════════════════════════════════════════════════════╗)
- *(║ Change the Arrow keys to work like [F8] and [F7]. ║)
- *(║ The ENTER key is unaffected. ║)
- *(║ These will be used in a form with tiers. ║)
- *(╚═════════════════════════════════════════════════════════════╝)
- *(╔═════════════════════════════════════════════════════════════╗)
- *(║ 0;72 = Up Arrow 0;65 = [f7] ║)
- *(║ 0;80 = Down Arrow 0;66 = [f8] ║)
- *(║ To reassign keys, use this format: (oldkey);(newkey);p ║)
- *(╚═════════════════════════════════════════════════════════════╝)
- Output con
- Set Variable vANSI TEXT
- Set Variable vANSI to (CHAR(27)+ "[0;72;0;65p")
- Show Variable vANSI at 8 5
- Set Variable vANSI to (CHAR(27)+ "[0;80;0;66p")
- Show Variable vANSI at 8 5
- Clear vANSI
- Output Screen
- Return
- $Command
- ArrowEsc
- *(╔═════════════════════════════════════════════════════════════╗)
- *(║ Change the Arrow keys to work like [F8] and [F7]. ║)
- *(║ The ENTER key is redefined to be the [ESC] key. ║)
- *(║ These will be used in a form with tiers. ║)
- *(╚═════════════════════════════════════════════════════════════╝)
- *(╔═════════════════════════════════════════════════════════════╗)
- *(║ 0;72 = Up Arrow 0;65 = [f7] ║)
- *(║ 0;80 = Down Arrow 0;66 = [f8] ║)
- *(║ 27 = [Esc] 13 = [Return] ║)
- *(║ To reassign keys, use this format: (oldkey);(newkey);p ║)
- *(╚═════════════════════════════════════════════════════════════╝)
- Output con
- Set Variable vANSI TEXT
- Set Variable vANSI to (CHAR(27)+ "[0;72;0;65p")
- Show Variable vANSI at 8 5
- Set Variable vANSI to (CHAR(27)+ "[0;80;0;66p")
- Show Variable vANSI at 8 5
- Set Variable vANSI to (CHAR(27)+ "[13;27p")
- Show Variable vANSI at 8 5
- Clear vANSI
- Output Screen
- Return
- $Command
- EndArrow
- *(╔═════════════════════════════════════════════════════════════╗)
- *(║ Return REDFINED keys back to their origional function. ║)
- *(║ Uhhh.. "Zero out arrow keys" ║)
- *(╚═════════════════════════════════════════════════════════════╝)
- Output con
- Set Variable vANSI TEXT
- Set Variable vANSI to (CHAR(27)+ "[0;72;0;72p")
- Show Variable vANSI at 8 5
- Set Variable vANSI to (CHAR(27)+ "[0;80;0;80p")
- Show Variable vANSI at 8 5
- Set Variable vANSI to (CHAR(27)+ "[13;13p")
- Show Variable vANSI at 8 5
- Clear vANSI
- Output Screen
- CLS
- Return
-