Start Menu

Start menu is the menu in the MDI container.

This tool is used to start applications within the MDI container. You can use start menu only in GUI mode.

 

Start menus can be set in 2 ways:

 

      

Please, remember that start menu is not a different kind of menu. Any kind of menu (e.g. topMenu) becomes a start menu if you use it to start applications in the MDI mode.

 

You can choose 3 possible types of start menus:

 

You can set the type of the start menu in the 4gl source file

 

   CALL ui.Application.GetCurrent().getApplicationMenu().setMenuType("Tree")

 

For our example of the static start menu,

 

MAIN

 

   CALL ui.Interface.setType("container")

   CALL ui.Application.GetCurrent().setMenuType("Tree")

   CALL ui.Interface.setName("My MDI Container")

   CALL ui.Interface.setText("Welcome to the MDI mode")

   CALL ui.Interface.loadStartMenu("mdi_startmenu")

   

 

MENU -- specifies actions performed by the program

   COMMAND "Accept"

   EXIT MENU

 END MENU

 

END MAIN

 

 

For our example of the dynamic start menu,

 

MAIN

 

...

 

WHILE TRUE

CALL ui.Application.GetCurrent().setMenuType("Tree")

CALL menu_publish()

 

 

  LET action_id = execute_menu()

 

  IF action_id = 0 THEN

   CONTINUE WHILE

  END IF

  

...

 

END WHILE

 

END MAIN