Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CC.LIB - ClipCode CLIPPER S'87 Library - <b>menuv() vertical menu to with highlighted trigger letters</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MENUV()     Vertical MENU TO with highlighted trigger letters

 Syntax....: MENUV(@iOpt,tr,lc,aprmpt,actv,acolr,bxtyp,aMsg,msrw,atrg,atpos,TmO)
 Parameters: <expN>:@iOpt  = initial option to highlight
             <expN>: tr    = top row for the 1st menu prompt
             <expN>: lc    = left column for the menu prompts
             <arrC>: aprmpt= array of menu option prompts
             <arrL>: actv  =
             <arrC>: acolr = array of color strings for SET COLOR TO
                             [1]= vcolor when not selected
                             [2]= vcolor for unselected trigger
                             [3]= vcolor for selected option
                             [4]= vcolor for selected trigger
                             [5]= color for inactive option
                             [6]= color for msg row
             <arrC>: aMsg  = vertical message help text
             <expN>: msrw  = message  help text row
 [optional]  <arrC>: atrg  = array of trigger letters
  "      "   <arrN>: atpos = array of trigger letter positions
  "      "   <expN>: TmO   = seconds for menu time out (if timeout, returns 0)

 Returns...: <expN>: ss, else 0
 Cautions..: none
 CC Calls..: none
 Alias.....: none

 Example...: ( see also CC_DEMO.PRG )

  PRIVATE dim, vopt, pick
  dim= 6
  PRIVATE aprom[dim], active[dim], amsg[dim]
  *PRIVATE atrg[dim], tpos[dim], arows[dim]     && optional

  aprom[1]=  " Open a new file "
  aprom[2]=  " Display another file "
  aprom[3]=  " Save as... "
  aprom[4]=  " Change file name "
  aprom[5]=  "-"
  aprom[6]=  " Quit "

  ASTORE( active, .T., .T., .T., .F., .F., .T. )

  amsg[1]=  "Open a new file for editing or execution"
  amsg[2]=  "Display another file in a popup window for reference"
  amsg[3]=  "Write current file to disk as file name ..."
  amsg[4]=  "Change the output file name"
  amsg[5]=  "-"
  amsg[6]=  "Exit to DOS"

  PRIVATE acolr[6]
  acolr[1]=  "W/B"                      && vcolor for unselected option
  acolr[2]=  "W+/B"                     && vcolor for unselected trigger
  acolr[3]=  "R/W"                      && vcolor for selected option
  acolr[4]=  "R/W"                      && vcolor for selected trigger
  acolr[5]=  "R/B"                      && vcolor for inactive option
  acolr[6]=  "N/W"                      && vcolor for message row

  vopt= 1
  pick= 1
  DO WHILE pick <> 6
             *  @vopt,row,colm, aprompt, active, acolr,[aMsg, Mrow, atrg, atpos ]
    pick= MENUV(@vopt,  2, 10,    aprom, active, acolr, amsg )
    @ 2, 40 SAY ""
    ?? pick
  ENDDO

See Also: MENUH MENUPD

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson