CREATES A SYSTEM OBJECT MAIN_MENU AND ALLOCATES IT NUMBER N AS REFERENCE
ACTION
The command MAIN_MENU N creates a system object MAIN_MENU, and allocates it a number N. The number N will be used to designate the MAIN_MENU.
The created MAIN_MENU can then be used through the appropriated commands.
A MAIN_MENU is used to design a menu system with its accompanying drop-down menus on a FORM. There is only one MAIN_MENU per FORM.
A MAIN_MENU cannot generate an event. The events are attached to the SUB_MENU.
Remark: by default, the MAIN_MENU is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the MAIN_MENU.
SYNTAX:
MAIN_MENU N
USE ERROR EXAMPLE
rem create the more simple menu
rem 1 - create a main_menu
main_menu 1
rem 2 - create a sub_menu
sub_menu 2
rem 3 - son of the main_menu
parent 2,1
rem 4 - and gives it a text to display
caption 2,"File"
MAIN_MENU
MAIN_MENU N
SEE ALSO
MAIN_MENU_POP
SUB_MENU
PARENT
ON_CLICK