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>menuh() horizontal menu to with highlighted trigger letters</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MENUH()     Horizontal MENU TO with highlighted trigger letters

 Syntax....: MENUH( @iOpt, row, acolm, aprompt, acolr [,atrg [,atpos [,TmO]]] )
 Parameters: <expN>:@iOpt   = initial option to highlight
             <expN>: row    = the row for the menu
             <arrN>: acolm  = array of starting columns for prompts
             <arrC>: aprompt= array of menu option prompts
             <arrC>: acolr  = array of color strings for SET COLOR TO
                              [1]= hcolor when not selected
                              [2]= hcolor for unselected trigger
                              [3]= hcolor for selected option
                              [4]= hcolor for selected trigger
 [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 = the array subscript of the option selected, else 0
 Cautions..: none
 CC Calls..: none
 Alias.....: none

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

  PRIVATE mNbr, rw, iopt
  mNbr= 4
  PRIVATE acolm[mNbr], aprom[mNbr], acolr[mNbr]
  *PRIVATE atrg[mNbr], atpos[mNbr]

  acolm[1]= 1
  acolm[2]= aColms[1]+LEN(aProm[1])+2
  acolm[3]= aColms[2]+LEN(aProm[2])+2
  acolm[4]= aColms[3]+LEN(aProm[3])+2

  ASTORE( aProm," OK "," No "," Cancel "," Help " )
  *ASTORE( atrg, "O"  , "N"  , "C"      , "H" )         && optional

  acolr[1]= "W/B"                       && hcolor when not selected
  acolr[2]= "W+/B"                      && hcolor for unselected trigger
  acolr[3]= "R/W"                       && hcolor for selected option
  acolr[4]= "W+/W"                      && hcolor for selected trigger

  rw=   2                               && row for MENUH()
  iopt= 1                               && for reentry
            *  @iopt, row, acolm, aprompt, acolr, atrg, atpos
  pick= MENUH( @iopt,  rw, acolm,   aprom, acolr )

  DO CASE
    CASE pick = 0
      RETURN .F.
    CASE pick = 1
      ...
    CASE pick = 4
      ...
  ENDCASE

See Also: MENUV MENUPD

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