MenuFunc ()

Display a function menu in the AcuDialog window.


menuVal = MenuFunc( name = None, tooltip = None,
                              whatsthis = None, helpURL = None,
                              func = None, ketText = None,
                              args = None, 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.
func (function)
A function name which should be run by clicking the push button of this menu.
keyText (string)
The text which is displayed on the push button.
args (list)
The arguments which are passed to the func for running.
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, tooltip, whatsthis, helpURL, func, keyText, args and show.


The show statement should be a logical correct conditional expression.

The func should be already defined.


This routine places a function menu in the AcuDialog window. This menu has a push button labeled with a text. Clicking this button will run a user defined function. 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,
def clrFileListSetting( args, values ):
                print "clear",values
mnuClrRecFiles = AcuDialog.MenuFunc( name = 'Clear Recent Files',
                                      tooltip = 'Clear Recent Files',
                                      whatsthis = 'Clear Recent Files',
                                      helpURL = 'Clear_Recent_Files.htm',
                                      func = clrFileListSetting,
                                      keyText = 'Clear',
                                      args = None )