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

 Syntax
   func logical menuisactive 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
   A logical indicating the active status of the specified prompt. If an in-
   valid menu pointer or id was specified, .f. will be returned.

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

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_menuisactive
   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, .f., .t. )
   menupromptnew( pMenu, 5, 10, " Option 4 ", 4, .t., .t. )
   
   ? menuisactive( pMenu, 1 )   // Prints .T.
   ? menuisactive( pMenu, 2 )   // Prints .T.
   ? menuisactive( pMenu, 3 )   // Prints .F.
   ? menuisactive( pMenu, 4 )   // Prints .T.
   
   menuclear( pMenu )
   
   endproc

   proc main
   Test_menuisactive()
   endproc

See Also: menusetactive()

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