filemenubar
filemenubar
STANDARDMENUS
,
CUSTOMMENUS
,
MENUNAME

The filemenubar statement creates a custom menu bar or context menu for the current database (see Custom Menus).

Parameters

This statement has three parameters:

standardmenus – specifies which standard menus should be included at the beginning and end of the menu bar. By default, the menu bar will always contain the Panorama, Action, and Window menus. This parameter allows you to easily add the File, Edit and View menus, and allows you to remove the Action and/or Window menus. See the text below for details.

custommenus – formula for defining fully custom menus in the menu bar.

menuname – name of the menu bar. The allowed values are `DATA_MENUBAR`, `DATA_CONTEXTMENU` and `COLUMN_CONTEXTMENU`. See the text below for details.

Description

This statement creates a custom menu bar or context menu for the current database (see Custom Menus). You can create all menus entirely from scratch, or you can use a mix of standard menus (File, Edit, etc.) with your own custom menus.

The first parameter specifies the standard menus you want to include. We’ll look into the details of this later, but specifying `BASIC` is all you’ll need to get Panorama’s minimum basic menus.

    filemenubar "basic",""

Here are the menus you’ll get if you use the statement above:

    Panorama File Edit Action Window Help

Once you’ve got the basics, you can start getting fancy. (Note: This example statement is split over multiple lines for clarity, but this is not necessary.)

    filemenubar "basic",
        menu("Invoice")+
            menuitem("Create New Invoice")+
            menuitem("Void")+
            menuitem("Delete")

Now there is a custom Invoice menu between the Edit and Action menus.

    Panorama File Edit Invoice Action Window Help

This example included only one custom menu, but you can add as many as you like (up to the width of the screen).

#### Including Standard Menus

You can include standard menus at the beginning of the menu bar either individually or in groups. To include a menu individually, simply include its name.

    filemenubar "file",""
    filemenubar "file edit view",""

The available standard menus are: file, edit, view, records, search, and field.

Standard menus can also be included in groups. The available groups are:

- basic -- file edit
- database -- records field
- all -- file edit view records field

You can use groups in combination with individual standard menus and with other groups:

    filemenubar "basic view",""
    filemenubar "basic view search",""
    filemenubar "basic database","" // does not include View menu

#### Excluding Standard Menus

The filemenubar statement normally generates four menus automatically: Panorama, Action, Window, and Help. If you don’t want one of these menus, put its name into the list of standard menus, prefixed with a minus sign.

    filemenubar "basic -action",""

Here are the menus you’ll get if you use the statement above:

    Panorama File Edit Window Help

Note: You cannot remove the Panorama menu, it will always be included.

If you want to remove all of these menu items (except Panorama), put `-NONE` in the standard menu specification:

    filemenubar "basic -none",""

Here are the menus you’ll get if you use the statement above:

    Panorama File Edit

#### Modifying Standard Menus

You may want to include one or more standard menus (File, Edit, Records, etc.) but modify them slightly – perhaps adding, changing or removing items. You can do this by creating a completely new custom menu, but you can also “tweak” most standard menus. An advantage of the latter approach is that if Panorama’s standard menu changes in a later release, your custom menus will automatically track that change without any effort on your part. To learn how to do this see Customizing the Menu in the standardfilemenu( function.

#### Context Menus (Right-Click Pop-Up Menu)

In addition to customizing the menu bar, the filemenubar statement can also modify the data sheet’s context (pop-up) menus. This is done by setting the optional menuname parameter to either `DATA_CONTEXTMENU` or `COLUMN_CONTEXTMENU`. When setting up context menus there are no standard menus, so the first parameter should be left empty (actually anything put in that parameter will be ignored).

This example sets up the context menu that appears when a data cell is right clicked.

    filemenubar "",
        menu("Context Menu")+
            menuitem("Select Same")+
            menuitem("Select Different")+
            menuitem("Select Contains..."),
        "DATA_CONTEXTMENU"

Note: This example names the menu Context Menu, but any name can be used.

This example sets up the context menu that appears when a data sheet column is right clicked.

    filemenubar "",
        menu("Context Menu")+
            menuitem("Show Field Properties")+
            menuitem("Add Field")+
            menuitem("Insert Field")+
            menuitem("Delete Field"),
        "COLUMN_CONTEXTMENU"

Note: This example names the menu Context Menu, but any name can be used.

#### Removing a Menu Definition

To remove a menu bar or context menu, set the menuname parameter to the name of the menu to be removed, preceded by a minus sign. When used to delete menus, the standardmenu and custommenu parameters are ignored. This example removes all custom menus from the current file, restoring Panorama’s default menus.

    filemenubar "","","-DATA_MENUBAR"
    filemenubar "","","-DATA_CONTEXTMENU"
    filemenubar "","","-COLUMN_CONTEXTMENU"

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.
- 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.
- menu( -- creates a menu (see Custom Menus).
- 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

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but with new options for standard menus, for setting up context menus, and for removing menu definitions.