MENU rendering and behavior

This topic describes differences between I4GL and FGL MENU instructions in TUI mode.

Menu disappears when displaying to its lines

With IBM® Informix® 4GL, it is possible to overwrite the menu options and comment line with DISPLAY text AT line,column: The menu elements remain visible and will be refreshed when the control goes back to the MENU dialog:
MAIN
   MENU "Menu1"
     COMMAND "Option1" "This is option #1"
     COMMAND "Option2" "This is option #2"
     COMMAND "Menu2"   "Executes second MENU" CALL menu2()
     COMMAND "Quit" EXIT MENU
   END MENU
END MAIN

FUNCTION menu2()
   OPTIONS MENU LINE 10
   MENU "Menu2"
     COMMAND "DisplayAt1" DISPLAY "xxxxxxxxxxxxxx" AT 1,6
     COMMAND "DisplayAt2" DISPLAY "xxxxxxxxxxxxxx" AT 2,10
     COMMAND "Quit" EXIT MENU
   END MENU
   OPTIONS MENU LINE 1
END FUNCTION
When in TUI mode with Genero BDL, the first MENU will disappear as soon as some text is displayed in one of the menu lines. Genero understands that you want to reuse space used by the first menu, and clears the menu lines to avoid corrupted screens.

Menu disappears when leaving the MENU instruction

With IBM Informix 4GL, the menu options and comment text remain visible even when the MENU instruction ends. In the next code example, after the first MENU instruction terminates, the menu display line is modified (OPTIONS MENU LINE) and a second MENU instruction is executed. The first MENU is still visible while executing the second MENU:
MAIN
   MENU "Menu1"
     COMMAND "Option1"
     COMMAND "Quit" EXIT MENU
   END MENU
   OPTIONS MENU LINE 10
   MENU "Menu2"
     COMMAND "Option1"
     COMMAND "Quit" EXIT MENU
   END MENU
END MENU

With Genero BDL, the first MENU disappears when the second MENU starts.