Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function stabmenu() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION STABMENU()

  Short:
  ------
  STABMENU() Tabular (grid style) menu

  Returns:
  --------
  <nSelection> => Number of menu option selected

  Syntax:
  -------
  STABMENU(nTop,nLeft,nBottom,nRight,aPrompts,[nStart])

  Description:
  ------------
  Does a tabular (grid) menu based on an array of
  prompts passed as <aPrompts>. Dimensions of the menu table will be
  <nTop,nLeft,nBottom,nRight>. Number of menu rows is
  the number of rows Number of menu columns is determined based on
  number of rows. Prompts are layed out in a snaking fashion :

     e.g. (for a 3 row table...)

       column 1, row 1  = 1st prompt
       column 1, row 2  = 2nd prompt
       column 1, row 3  = 3rd prompt
       column 2, row 1  = 4th prompt

  Pressing a character will move to the next matching
  prompt with that first letter. Left-right and up-down perform a
  snaking pattern

  Pressing ENTER causes selection to be made, and the
  number of the selection to be returned.

  Pressing ESCAPE returns 0.

  [nStart] Optional starting options. Default is 1.

  Examples:
  ---------
   nChoice := ;
          stabmenu(10,10,14,70,{"One","two","three","four",;
                        "five","six","seven","eight",;
                        "nine","ten","eleven","twelve"}, 5)

  Notes:
  -------
  This is a non-popup version of PSTABMENU(), and will
  remain on the screen when done.

  Source:
  -------
  S_TABMEN.PRG


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