loadTopMenu() is used to load a top menu for the specified ui.Form object:
CALL MyForm.LoadTopMenu("mytopmenu_form")
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.
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.
If several files with the same name exist in the same location, specify the extension of the file to load:
CALL MyForm.LoadTopMenu("mytopmenu_form.tm2")
Otherwise, the method will search for the files in the following order until it finds the top menu definition:
When you specify a file name, be careful with its case.
UNIX is case-sensitive, so it will treat files which names come in different cases as separate files.