Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - menugetrow() return a prompt's screen row http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 menugetrow()        Return a prompt's screen row
------------------------------------------------------------------------------
 Declaration
   menu.hdr

 Syntax
   func int menugetrow extern
   param value _MENU pMenu, ;
         value int   iId

 Arguments
   pMenu is the pointer to a previously created menu system. If 0, the
         default menu will be used.
   iId   is the id number of the prompt.

 Return
   An int containing the screen row position of the specified prompt, or -1
   in case an invalid menu pointer or id was passed.

 Description
   This is a utility function that might be called from within menu handlers.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_menugetrow
   vardef
      _MENU pMenu
   enddef
   
   clear
   
   menusethot( .t. )
   pMenu := menunew()
   
   menupromptnew( pMenu, 2, 10, " Option 1 ", 1, .t., .t. )
   menupromptnew( pMenu, 3, 10, " Option 2 ", 2, .t., .t. )
   menupromptnew( pMenu, 4, 10, " Option 3 ", 3, .t., .t. )
   menupromptnew( pMenu, 5, 10, " Option 4 ", 4, .t., .t. )
   
   @ 10, 0
   ? menugetrow( pMenu, 1 )  // Prints 2
   ? menugetrow( pMenu, 2 )  // Prints 3
   ? menugetrow( pMenu, 3 )  // Prints 4
   ? menugetrow( pMenu, 4 )  // Prints 5
   
   menuclear( pMenu )
   
   endproc

   proc main
   Test_menugetrow()
   endproc

See Also: menugetcol()

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