submenu(
TITLE
,
OPTION
,
VALUE
)

The submenu( function creates a submenu (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) that can later be attached to a menu item as a submenu. In its simplest form, the function has a single parameter, the title of the menu item. This example creates a submenu named Shippers.

submenu("Shippers")+
    menuitem("Airborne")+
    menuitem("Fedex")+
    menuitem("US Postal Service")+
    menuitem("UPS")

Because it is a submenu, the Shippers menu does not appear in the menu bar. However, it can be attached as a submenu to a menu item in a subsequent menu.

menuitem("Ship Via","SUBMENU","Shippers")

That’s all there is too it. When the menu is pulled down, Shippers will automatically appear as a submenu to the Ship Via menu item.

In addition to the title parameter, you can also specify one or more option/value pairs that modify the menu appearance, like this:

menuitem(title,option1,value1,option2,value2,option3,value3)

Here is an example that creates an Oceans submenu that is displayed in blue, using the font Futura Condensed.

submenu("Oceans","FONT","Futura Condensed","COLOR","0000FF")+
    menuitem("Atlantic")+
    menuitem("Pacific")+
    menuitem("Indian")

For more information about menu appearance options see the menu( function.


See Also


History

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