MenuFile ()

Display a file menu in the AcuDialog window.


menuVal = MenuFile( name = None, tooltip = None,
                              whatsthis = None, helpURL = None,
                              default = None, new = False,
                              settings = None, dbAccess= None,
                              filters = ' ', show = None )


name (string)
Label of the menu. This is displayed on the left.
tooltip (string)
Tooltip help information, also known as bubble. The content of this argument is displayed in a small dynamic box placed opened above the menu, when the cursor remains at the menu for short time. This is typically a short phrase.
whatsthis (string)
Whatsthis help information. When you click on the whatsthis icon followed by clicking on this menu, a small box is opened above the menu and the content of this argument is displayed in it. This is typically a short sentence or two, which provides more information than that given by the tooltip argument. The whatsthis argument is a rich text format, which means you can embed many of the HTML tags, such as <br> for line separator and <b> for bold.
helpURL (string)
This is the HTML-URL address containing detail help on the menu item. When you press the F1 key while the cursor is on top of this menu, the assistance help system opens and displays this page.
enum (tuple)
List of the values that are put in the menu combo box. You can select one of them as the menu value. Each member in this tuple is itself a tuple with two members. The first is the name which is shown in the combo box and the second one is the value that will return as the menu value if you select this item in the combo box.
new (boolean)
Flag indicating whether or not the file should exist. Many times, we may want a new file and/or we can accept an old one.
default (string)
Default value. If the data base or settings does not contain the parameter given by the dbAccess or settings arguments respectively, it is first initialized to this value.
settings (string)
The setting name which is used for storing the menu value in the settings.
dbAccess (list)
The data base information which is used for storing the menu value in the data base. It is a list that includes data base name, node and unique par (parameter name) used for this menu value.
filters (string)
List of filters used in the file dialog. When you click on the browse button to select a file only the files that match the filters will be shown.
show (string)
The conditional show statement which will be evaluated to determine if this menu should be shown or not.

Return Value

menuVal (list)
A list filled with all the information about this menu including type of the menu, name, default, new, tooltip, whatsthis, helpURL, settings, filters, dbAccess and show.


Only one of the dbAccess or settings could be specified and passed to menu function.

The show statement should be a logical correct conditional expression.

The default should be in accordance with menu type.


This routine places a file menu in the AcuDialog window. The menu contains a label given by the name. The menu information is given by tooltip, whatsthis and helpURL. The displayed value is extracted from the dbAccess or settings. Upon change, the value is deposited back onto the data base or settings. The show statement is a conditional expression which starts with values word and evaluates any member in the values list. The values is a list that includes all the previous menu's values. For example, if the current menu is the fourth menu in the dialog, the values includes values of the first three menus.

For example,
mnuFile = AcuDialog.MenuFile( name = 'File name',
                                        tooltip = 'file name',
                                        whatsthis = 'file name',
                                        helpURL = 'file_name.htm',
                                        default = 'pipe/pipe.msh',
                                        new = True,
                                        settings = 'browse/file' )