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 - menusetcurrent() make a prompt current http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 menusetcurrent()    Make a prompt current
------------------------------------------------------------------------------
 Declaration
   menu.hdr

 Syntax
   func logical menusetcurrent 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 function makes the prompt specified by the iId argument
   current. This prompt, and the previously current prompt will be
   automatically redisplayed with the corresponding color attributes.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_menusetcurrent
   vardef
      _MENU pMenu
   enddef
   
   clear
   cursor( .f. )
   pMenu = menunew()
   
   menupromptnew( pMenu, 5, 5, " 1st prompt ", 1, .t., .t. )
   menupromptnew( pMenu, 6, 5, " 2nd prompt ", 2, .t., .t. )
   menupromptnew( pMenu, 7, 5, " 3rd prompt ", 3, .t., .t. )
   menupromptnew( pMenu, 8, 5, " 4th prompt ", 4, .t., .t. )
   
   menusetcurrent( pMenu, 4 ) ; waitms( 1000 )
   menusetcurrent( pMenu, 3 ) ; waitms( 1000 )
   menusetcurrent( pMenu, 2 ) ; waitms( 1000 )
   menusetcurrent( pMenu, 1 )
   
   menuclear( pMenu )
   @ 10, 0
   cursor( .t. )
   
   endproc

   proc main
   Test_menusetcurrent()
   endproc

See Also: menucurrentid() menusetactive()

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