ui.Form.LoadTopMenu()

It is possible to use a form file to store a Top Menu which one can apply to other form files and windows.

To have a Top Menu that can be added to other program objects, you should create a form containing only a Top Menu and no other form objects besides the default ones.

The third-party files containing the Top Menu definition are also converted into the .fm2 format.

The LoadTopMenu() method is used to load a Top Menu for the specified ui.Form object:

CALL MyForm.LoadTopMenu("mytopmenu_form")

If there is a Top Menu already specified for the target form, this Top menu is replaced by the one loaded from the .fm2 file.

It is advised that you don’t use the file extension name in the Top Menu form specification. In this case, the runtime system will automatically add it. However, you still can specify the toolbar form as "mytopmenu_form.fm2"