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 - menuleftcol() return the leftmost menu column http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 menuleftcol()       Return the leftmost menu column
------------------------------------------------------------------------------
 Declaration
   menu.hdr

 Syntax
   func int menuleftcol extern
   param value _MENU pMenu

 Arguments
   pMenu is the pointer to a previously created menu system. If 0, the
         default menu will be used.

 Return
   An int containing the leftmost screen column used by the specified menu,
   or -1 in case an invalid menu pointer was passed.

 Description
   This is a utility function that might be called from within menu handlers,
   e.g. to determine the screen area that will be occupied by a sub-menu in
   order to save that screen area before displaying the menu.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_menuleftcol
   vardef
      _MENU pMenu
   enddef
   
   clear
   pMenu = menunew()
   
   menupromptnew( pMenu, 5, 15, " 1st prompt ", 1, .t., .t. )
   menupromptnew( pMenu, 6, 15, " 2nd prompt ", 2, .t., .t. )
   menupromptnew( pMenu, 7, 15, " 3rd prompt ", 3, .t., .t. )
   menupromptnew( pMenu, 8, 15, " 4th prompt ", 4, .t., .t. )
   
   ? menuleftcol( pMenu )   // Prints 15
   
   menuclear( pMenu )
   
   endproc

   proc main
   Test_menuleftcol()
   endproc

See Also: menucoloffset() menupromptlen() menurowoffset() menutoprow()

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