Display a tab menu in the panel window.


MenuTab( tabs, node, par,
                   redraw=False, default=None )


tabs (tuple of strings)
A set of (label, value) pairs of valid values. Label is shown on tab widget and value is stored in the data base.
node (string)
Data base path of the node containing the parameter.
par (string)
Parameter name. The value of the menu is extracted from this parameter under the above node, and upon change by you, the value is deposited therein.
redraw (boolean)
Flag specifying whether to redraw the panel when you change the value. This allows inclusion of complex menus that dynamically depend on the value of this menu.
default (string)
Default value. If the data base does not contain the parameter given by the node and par arguments, it is first initialized to this value.

Return Value



  • The parameter in the data base must be one of the defined tab names.
  • The parameter must exist in the data base or the default must not be None.


This routine places a tab menu in the panel window. The menu contains a label given by the name argument. The displayed value is extracted from the data base node and par. Upon change, the value is deposited back onto the data base. Now, if redraw is True, the entire panel is redrawn. This provides the opportunity to change the other menu selections. For example,
nodeBfs = ROOT + RS + 'BODY_FORCE' + RS +
MenuTab( tabs = ( ( 'Gravity','gravity'),
               ( 'Heat Source','heat source'),
               ( 'Species Source','species source')),
         node = nodeBfs,
         par = 'tab',
         redraw = True,
         default= 'gravity' )