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 - set message to set the row for displaying the menu system message http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 set message to      Set the row for displaying the menu system message
------------------------------------------------------------------------------
 Syntax
   set message to uRow

 Arguments
   uRow is the screen row where the menu message is displayed.

 Description
   The set message to command sets the row for displaying the menu system
   message.

   set message to directs any message display generated by the menuing
   system to a specific line. The default row is 24 (bottom row of the
   typical screeb). If no messages are generated by a menu system, the
   message row will remain unaltered.

 Example
   #define EXAMPLE_MENU
   #include example.hdr

   #define LEN_MENU 3        // number of menu items
   
   vardef static
      char(  4 ) aMenu[ LEN_MENU ] := "File", "Edit", "Help"
      char( 20 ) aMsg[ LEN_MENU ]  := "Open and save files", ;
                                      "Perform editing", ;
                                      "Provide help"
   enddef
   
   proc Test_setmessageto
   vardef
      int  iChoice
      uint nCol
      uint n
   enddef
   clear
   cursor( .f. )
   set message to 24  // make messages appear at bottom of the screen (default)
   @ 23, 0 prompt "Next" message "Get next record"
   @ 23,10 prompt "Last" message "Get last record"
   @ 23,20 prompt "Help" message "Display screen help"
   @ 23,30 prompt "eXit" message "Exit this function"
   iChoice := 2
   menu to iChoice
   /*
   Output:
   Next         Last            Help            eXit
   Get next record
   */
   
   // get menu data from arrays
   clear
   nCol := 5
   for n := 0 to 2
      @ 1, nCol prompt aMenu[ n ] message aMsg[ n ]
      nCol := nCol + len( aMenu[ n ] ) + 3  // 3 spaces between each prompt
   next
   set message to 5
   menu to iChoice
   endproc

   proc main
   Test_setmessageto()
   endproc

See Also: getmessage() menu to

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