Was this helpful?
Display Submenu
Displays a submenu that is not attached to a query.
Syntax
display submenu 
begin | {
  operations 
end | }
Description
Display submenu displays on the menu line of a frame a menu that is not attached to a query. Use display submenu with an operation list if you want the form to be active; you have access to the fields on the form while the menu is displayed. The submenu is not influenced by form mode, and remains on the menu line until an endloop operation is executed.
The display submenu statement signals the start of a submenu that replaces the original menu line for the form. The submenu consists of the double keywords display submenu followed by an operations list (that is, a list of activations and statement blocks). The submenu operation can contain a time-out section and a database event section. The keyword end that concludes the display submenu statement must be followed by a semicolon.
As with submenus produced by attached queries, you can include an initialization block in a display submenu statement. This initialization operates the same way as in an initialization statement, except that you cannot declare variables in a display submenu initialization.
Display submenu allows you to display a submenu without attaching it to a query. If your 4GL specification does not require an attached query, do not construct one to use this submenu. 4GL supports two statements, run submenu and display submenu, that you can use in this way. The principle difference between the two statements is that, in display submenu, the form remains active, while in run submenu, the form is inactive. See Run Submenu.
You cannot use the resume menu or resume entry statements in a run submenu and its operations.
Example
This example displays a submenu with two menu options, DetailFrame and End:
display submenu 
begin
  initialize = 
  begin
    message 'Beginning submenu';
  end
  'DetailFrame' =
  begin
    callframe subframe;
  end
  'End' = 
  begin 
    endloop;
  end
end;
Last modified date: 11/28/2023