Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>menuh()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MENUH()

    This function allows you to easily paint a horizontal Lotus-style
    light-bar menu on the screen.  The syntax is:

    MENUH(<row>, <column>, <spaces>, <prompts> [,<messages>, <color>])

    Required Parameters

    <row> is a numeric expression representing the row at which to
    display the light-bar menu.

    <columns> is a numeric expression representing the starting column
    for the light-bar menu.

    <spaces> is a numeric representing the desired spacing between menu
    entries.

    <prompts> is a character string containing all of the prompts for
    the menu.  These prompts MUST be separated by dollar signs ($).  If
    you pass a character string that does not contain at least one
    dollar sign, you will get an error message instead of a light-bar
    menu!

    Optional Parameters

    <messages> is a character string containing any desired messages
    corresponding to the prompts.  Like the prompts, the messages must
    be separated by dollar signs.  Also, you must terminate this
    character string with a dollar sign.

    <color> is a character string used to set the menu color.  If this
    parameter is not passed, white on black will be used for the
    unselected options and inverse will be used for the light bar.

    Return Value

    MENUH() returns a numeric value representing the selected menu
    option.  For example, if the user pressed 'D' in the sample below
    the return value would be 1.

    Sample usage and tips

    I recommend that you SET WRAP ON prior to calling MENUH() so that
    the cursoring off the left or right side of the screen will wrap to
    the other side.  Also, remember that you must SET MESSAGE TO a given
    row in order to display messages if you have used the <messages>
    parameter.

    SET WRAP ON                                                           
    SET MESSAGE TO 24 CENTER                                              
    sel = MENUH(23, 5, 4, 'Data Entry$Reports$Previous Menu$','','+W/B,I')
    DO CASE                                                               
       CASE sel = 1                                                       
          DO data                                                         
       CASE sel = 2                                                       
          DO reports                                                      
       OTHERWISE                                                          
          RETURN                                                          
    ENDCASE                                                               

    Clipper 5.0 Notes

    - You no longer need to SET WRAP ON prior to calling MENUH().  It will
      handle it.
    - MENUH() will automatically center the messages.
    - If you have not established a row at which to display the messages,
      MENUH() will use row 24.


See Also: LITE_MENU() MENUV()

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