menu(
TITLE
,
OPTION
,
VALUE
)
The menu( function creates a menu (see Custom Menus).
Parameters
This function has three parameters:
title – title of the menu.
option – one or more options that modify the menu. See below for descriptions of each option. The option name can be specified in either upper or lower case.
value – the value for the option specified in the previous parameter.
Description
This function creates a menu (see Custom Menus) and should be used in conjunction with the FileMenuBar statement or the WindowMenuBar statement. It also uses the menuitem(function and it would be wise to check out all of these before using this function. In its simplest form, the function has a single parameter, the title of the menu item. Here is a simple example of the function being used to create a menu with three menu items.
filemenubar "basic",
menu("Medals")+
menuitem("Gold")+
menuitem("Silver")+
menuitem("Bronze")
In addition to the title parameter, you can also specify one or more option/value pairs that modify the import operation, like this:
menuitem(title,option1,value1,option2,value2,option3,value3)
The rest of this page describes all of the option/value pairs that are available. Note: Most of the examples below show the option name in all upper case, for example STYLE
or FONT
, however, Panorama ignores upper and lower case, so key
and Key
will work just as well.
Menu Text Appearance (FONT and SIZE options)
Menus are normally displayed using the standard system font, but you can customize using any font and/or size you want.
menu("Classes","FONT","Chalkduster")
menu("Wedding","FONT","Snell Roundhand","SIZE",24)
menu("Race","FONT","Gill Sans",24)
You can also specify the font and/or size for individual menu items, see the menuitem( function.
Menus are normally displayed in black, but you can use the COLOR
option to choose any color you want. The color value is a 6 digit hex representation of the color (identical to the way that colors are represented in HTML code).
This example displays the items in the Oceans menu in blue.
menu("Oceans","COLOR","0000FF")+
menuitem("Atlantic")+
menuitem("Pacific")+
menuitem("Indian")
You can also specify the color for individual menu items, see the menuitem( function.
To specify that all of the items in a menu be bold or italic, use the STYLE
option, with values of BOLD
and/or ITALIC
.
menu("Cities","STYLE","ITALIC")+
menuitem("London")+
menuitem("Paris")+
menuitem("Tokyo")
The words BOLD
and ITALIC
can be in any order, can be separated by spaces, dashes, commas, or nothing at all (for example bolditalic
), and can be in upper or lower case (or a mix).
You can also specify the style for individual menu items, see the menuitems( function.
Most of the examples above have shown menu options used one at a time, but you can combine multiple options, as shown in this example.
menu("Oceans","FONT","Futura Condensed","COLOR","0000FF")+
menuitem("Atlantic")+
menuitem("Pacific")+
menuitem("Indian")
See Also
- Action Menu -- simple way to create your own menu items.
- arraymenuitems( -- converts a carriage return delimited array into a series of menu items.
- checkedarraymenuitems( -- converts a carriage return delimited array into a series of menu items, some of which may be checked.
- checkedmenuitem( -- creates a single menu item with an optional checkmark.
- Construct Menu -- used to automatically construct complex form applications, including calendars, lists, mailing labels, and more.
- Edit Menu -- edit text and data, to search (and replace), and to undo and recent actions.
- Field Menu -- manages fields, including adding and removing fields, setting field properties, sorting, morphing, hiding and showing.
- File Menu -- create, locate, open, close and save databases, import and export text, printing.
- filemenubar -- creates a custom menu bar or context menu for the current database (see Custom Menus).
- globalmenubar -- creates a custom menu bar or context menu for all windows (intended only for internal use by ProVUE Development).
- Help Menu -- contains items that will help you learn and use Panorama.
- info("menuidentifier") -- returns the identifier of the most recently chosen menu item (if any).
- LMSL -- is the specification language for Live Menus.
- Mark Menu -- allows you to set bookmarks in source code to help navigate to specific spots in a long program.
- menuitem( -- creates a single menu item (see Custom Menus).
- menuitems( -- converts a semicolon separated array into a live menu specification.
- Menus -- overview of Panorama X menu bars.
- menuseparator( -- generates a menu item separator
- noactionmenu( -- suppresses the *Action* menu.
- noinstrumentationmenu( -- supresses the *Instrumentation* menu.
- nowizardmenu( -- suppresses the *Wizards* menu.
- Objects Menu -- used to select, modify and arrange graphics objects in a form.
- Panorama Menu -- get and set information about Panorama itself, including the version number, licensing information, and memory usage.
- popupatmouse -- displays a pop-up menu at the current mouse location.
- popupbelowbutton -- displays a pop-up menu in response to clicking on a button.
- popupclick -- displays a pop-up menu at the current mouse location.
- popupdoublefieldchoices -- displays a pop-up menu listing values in a specified field, with submenus containing values from a second field.
- popupfieldchoices -- displays a pop-up menu listing values in a specified field.
- Program Menu -- assists with running and debugging code, and with developing custom dialogs.
- Records Menu -- add and remove database records.
- Search Menu -- is used search for data, to select records, and to find and replace text within the current field.
- Source Menu -- used to assist in editing program code.
- standardactionmenu( -- generates a Custom Menu specification for Panorama's standard Action menu.
- standardclassicsetupmenu( -- generates a customizable Custom Menu specification for Panorama's classic Setup menu.
- standardconstructgraphicsmenu( -- generates a Custom Menu specification for Panorama’s standard Construct menu (in Graphics Mode).
- standardeditmenu( -- generates a customizable Custom Menu specification for Panorama's standard Edit menu.
- standardfieldsmenu( -- generates a customizable Custom Menu specification for Panorama's standard Fields menu.
- standardfilemenu( -- generates a customizable Custom Menu specification for Panorama's standard File menu.
- standardhelpmenu( -- generates a customizable Custom Menu specification for Panorama's standard Help menu.
- standardinstrumentationmenu( -- generates a Custom Menu specification for Panorama’s standard Instrumentation menu.
- standardpanoramamenu( -- generates a Custom Menu specification for Panorama's standard Panorama menu.
- standardrecordsmenu( -- generates a customizable Custom Menu specification for Panorama's standard Records menu.
- standardsearchmenu( -- generates a customizable Custom Menu specification for Panorama's standard Search menu.
- standardsetupmenu( -- generates a customizable Custom Menu specification for Panorama's standard Setup menu.
- standardsortmenu( -- generates a customizable Custom Menu specification for Panorama's standard Sort menu.
- standardtextmenu( -- generates a customizable Custom Menu specification for Panorama's standard Text menu.
- standardviewmenu( -- generates a Custom Menu specification for Panorama's standard View menu.
- standardwindowmenu( -- generates a customizable Custom Menu specification for Panorama's standard Window menu.
- submenu( -- creates a submenu (see Custom Menus).
- Window Menu -- controls the back to front arrangement of windows, it allows you to hide, show, or customize the toolbar (see Toolbar, and allows you minimize or zoom the window to full screen.
- windowmenubar -- creates a custom menu bar or context menu for the current window (see Custom Menus).
History
10.0 | Updated | Carried over from Panorama 6.0, but with new options for setting font, text size, color and style. |