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

 Syntax
   proc selectid extern
   param value int     iMenuId, ;
         value logical lEnhanced

 Arguments
   iMenuId refers to the prompt to select.
   lEnhanced indicates if the selected prompt will be highlighted.

 Return
   None.

 Description
   This procedure allows pre-selecting one of the prompts in a menu.
   iMenuId specifies the number of the prompt to be preselected. If .t. is
   passed to lEnhanced this prompt will be highlighted (displayed in the
   color given in __syscolor[ CLR_ENHCD ]), otherwise it is displayed in
   standard color (according to __syscolor[ CLR_STD ]).

   After calling this procedure, the menu is still active, because it still
   requires the user's confirmation to select this prompt.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   proc Test_selectid
   // Pre-select the second prompt
   vardef
      uint uChoice
   enddef
   @ 01, 02 prompt " File  "
   @ 02, 02 prompt " Modify"
   @ 03, 02 prompt " Quit "
   selectid( 1, .f. )        // dehighlight first item
   selectid( 2, .t. )        // highlight second item
   menu to uChoice
   endproc

   proc main
   Test_selectid()
   endproc

See Also: menu to selectprompt()

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