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 - menugetcol() return a prompt's left screen column http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 menugetcol()        Return a prompt's left screen column
------------------------------------------------------------------------------
 Declaration
   menu.hdr

 Syntax
   func int menugetcol 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 leftmost screen column 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_menugetcol
   vardef
      _MENU pMenu
   enddef
   
   clear
   
   pMenu := menunew()
   
   menupromptnew( pMenu, 0,  0, " Cut ",   1, .t., .t. )
   menupromptnew( pMenu, 0,  6, " Copy ",  2, .t., .t. )
   menupromptnew( pMenu, 0, 13, " Paste ", 3, .t., .t. )
   menupromptnew( pMenu, 0, 21, " Quit ",  4, .t., .t. )
   
   ? menugetcol( pMenu, 1 )   // Prints  0
   ? menugetcol( pMenu, 2 )   // Prints  6
   ? menugetcol( pMenu, 3 )   // Prints 13
   ? menugetcol( pMenu, 4 )   // Prints 21
   
   menuclear( pMenu )
   
   endproc

   proc main
   Test_menugetcol()
   endproc

See Also: menugetrow()

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