Example TOPMENU in custform.per

The example shows a TOPMENU section in the form specification file (custform.per).

Form custform.per:
  1 TOPMENU
  2   GROUP form (TEXT="Form")
  3     COMMAND quit (TEXT="Quit", COMMENT="Exit the program", IMAGE="exit")
  4   END
  5   GROUP customers (TEXT="Customers")
  6     COMMAND query (TEXT="Find",IMAGE="find")
  7     SEPARATOR
  8     COMMAND next
  9     COMMAND previous
 10   END
 11 END
Note:
  • Lines 1 to 11: This example TOPMENU will consist of two groups on the menu bar of the form. The TEXT displayed on the menu bar for the first group will be Form, and the second group will be Customers.
  • Line 6 to 9: Under the menu bar item Customers, the action-identifier query on line 6 will be bound to the ON ACTION query clause in the program code. The other topmenu options are similarly bound by action name.
The revised form specification file must be recompiled before it can be used in the program:
fglform -M custform.per