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.

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.

Combining Multiple Menu Options

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


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but with new options for setting font, text size, color and style.