MENUFILE

Purpose:

Reads a text menu file and returns the menu on the screen in accordance with the specified parameters.

Syntax:

MENUFILE(x, y, fg, bg, "filename")

x

-

Optional. An integer, the x-coordinate in text columns. Defaults to -1 (centered).

y

-

Optional. An integer, the y-coordinate in text columns. Defaults to -1 (centered).

fg

-

Optional. An integer, the color of menu text. Defaults to the system defined color.

bg

-

Optional. An integer, the background color of the menu. Defaults to the system defined color.

"filename"  

-

A string. The name of the menu file.

Example:

menufile(0,0,"MENU1.MEN")

 

reads the menu file MENU1.MEN and displays the menu in the upper-left corner of the Worksheet.

Example:

MENUFILE accepts a filename with a dialog box specification:

 

 

// test.pan - file based menu

@panel

 

{defvar('myvar', 10)}

 

File Based Menu

 

Input <w=30 d=0>~myvar = <{myvar}>~input(2)

<L>

 

~menuclear

 

// end of test.pan

 

The dialog is invoked with MENUFILE:

 

menufile("test.pan")

 

 

Remarks:

The upper left-hand corner of the screen is the origin, with coordinates of x=0, y=0. The screen has dimensions of 80 columns by 24 rows. The bottom right-hand corner of the screen has coordinates x=80, y=24. To center the menu, set x and y to -1.

 

See MENULIST to create a dialog box from a list of strings.

 

See Creating DADiSP Menus for more details on dialog box creation and implementation.

 

See Also:

GETMENUCOORDS

INPUT

MENUCLEAR

MENUDELETE

MENULIST

MENUPRINT

MENUSHOW

PDCHISTORY

SETCONTROLVALUE

SETMENUCOORDS

VIEWFILE