SP_RAT_MENU2

RAT_MENU2()

  Short:
  ------
  RAT_MENU2() Mouseable MENU TO emulation

  Returns:
  --------
  <nSelected> => selected menu option, 0 for none

  Syntax:
  -------
  RAT_MENU2(aOptions,[nStart],[lImmediate],[bMouse])

  Description:
  ------------
  You must pass an array of arrays, with each element
  being an array in the form {nRow,nColumn,cPrompt} which
  correspond to      [ @nRow,nCol PROMPT cPrompt. ]

  [nStart] is an optional starting prompt, with the
  default being 1

  [lImmediate] refers to the action taken when a first
  letter or a mouse click changes options. The default is to have
  immediate action - select and return. By passing False, it
  becomes a 2 step  process, requiring click-click or
  firstletter-firstletter to select and return.

  [bMouse] is an optional codeblock for mouse clicks. If the
  mouse click does not satisfy RAT_MENU2(), and there is a
  [bMouse] codeblock, it will be evaluated as follows:

               eval(bMouse,mouserow, mousecol)

  Examples:
  ---------
   local aOptions := { ;
                      {23,2 ,  'Add'},;
                      {23,9 ,  'Open'},;
                      {23,17 , 'Delete'},;
                      {23,27 , 'Change Date'},;
                      {23,42 , 'Output list'},;
                      {23,57 , 'Purge '},;
                      {23,74 , 'Quit'}}

   nSelected := RAT_MENU2(aOptions,4,.f.,{|r,c| checkmouse(r,c) })

  Source:
  -------
  S_RMENU2.PRG

See Also : RAT_ELBHD(), RAT_EQMCOL(), RAT_EQMROW(), RAT_ERBHD(), RAT_EVENT(), 
           RAT_ISMOUSE(), RAT_LASTEV(), RAT_READ()

11 responses to “SP_RAT_MENU2

  1. Pingback: SP Mouse Functions | Viva Clipper !

  2. Pingback: SP Menu Functions | Viva Clipper !

  3. Pingback: SP Functions | Viva Clipper !

  4. Pingback: SP_RAT_READ | Viva Clipper !

  5. Pingback: SP_RAT_LASTEV | Viva Clipper !

  6. Pingback: SP_RAT_ISMOUSE | Viva Clipper !

  7. Pingback: SP_RAT_EVENT | Viva Clipper !

  8. Pingback: SP_RAT_ERBHD | Viva Clipper !

  9. Pingback: SP_RAT_EQMCOL | Viva Clipper !

  10. Pingback: SP_RAT_ELBHD | Viva Clipper !

  11. Pingback: SP_RAT_EQMROW | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.