Difference between revisions of "MENU FROM"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=MENU FROM=
 
 
 
 
==Class==
 
==Class==
 
Menus
 
Menus
Line 99: Line 96:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Menus]]
 +
[[Category:Menus Commands]]

Revision as of 08:31, 3 June 2009

Class

Menus


Purpose

Display a framed menu of options from a database table file


Syntax

MENU FROM <mdf filename> | (<expC1>)

AT <expN1>,<expN2> TO <expN3>,<expN4>

[BOLD]

[CLEAR]

[EXIT]

[HELPFILE <hlp filename> | (<expC2>)]

[LABEL <expC3>]

[NOREFRESH]

[OFF]

[QUIT]

[SELECT <expC4>]


See Also

@...MENU, MENU AT, MENU COMMAND, MENU FIELDS, MENU FILES, MENU FORMAT, MENU QUERY, MENU SCOPE, MENU(), MENUITEM()


Description

The MENU FROM command uses the entries in a standard Recital table (but with a .mdf filename) to construct a framed menu of options. The filename can be substituted with a <expC1>, enclosed in round brackets, which returns a valid filename. The table has an extension of .mdf and must have the following structure:


Field Type Width
MENU Character 25
COMMAND Character 80
HELP Character 80
NOREFRESH Logical 1


Each record in the database is equivalent to a command in the from: @…MENU <item> COMMAND <command> HELP <help> [NOREFRESH]. When a menu is activated from an <.mdf filename> the items in the database are vertically scrollable as with the MENU FILES command. The command list specified with a menu item can be another MENU FROM command, or a DO <procedure> command which activates another menu using any of the set of menu commands available in the Recital 4GL.

AT <expN1>,<expN2> TO <expN3>,<expN4>

The upper left corner of the menu is positioned on the coordinates <expN1> and <expN2>, and the lower right corner of the menu is positioned on the coordinates <expN3> and <expN4>.


Keyword Description
BOLD The menu frame is highlighted.
CLEAR The inside of the menu frame is cleared before displaying the menu.
EXIT The menu is exited following selection of a menu item and execution of the associated commands.. If the NOEXIT command is executed as one of the commands associated with a menu item, then the menu will not be exited.
HELPFILE <.hlp> A helpful text file can be associated with the menu. The <.hlp filename> will be displayed in a read-only window for viewing when the [HELP] key is pressed. The window will be labeled "Operating instructions." The file name can be substituted with a <expC2>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then ".hlp" is assumed. The command, INSTRUCT, must be set ON when using this option.
LABEL <expC3> The specified character string <expC3> is displayed at the top of the menu frame.
NOREFRESH The menu is generated without executing the extra commands (e.g. frame drawing) associated with it.
OFF The display of messages in the message line is disabled.
QUIT When the QUIT option is specified, the [ABANDON] key exits the menu.
SELECT <expC4> Multiple selections can be made. The MENUITEM() function can be used to return a string containing the selections made, each separated with <expC4>. Selections are made by placing the cursor on the required menu item and pressing the [RETURN] key. Once all the required selections have been made, the [EXIT/SAVE] key is used to save them or the [ABANDON] key will cancel them. The ASTORE() function can be used to place all the selections into separate array items.


Example

create menufile
rename menufile.dbf menufile.mdf
menu from menufile at 1,35 to 10,45 label "Options"


Products

Recital Mirage Server, Recital Terminal Developer