Go up one levelGo to Previous Go to Next

LabelMenu(n)

NAME

 
 LabelMenu - Itcl widget for displaying a label and a menubutton

NAMESPACE

 
 util

PARENT CLASS

 
 util::LabelWidget

SYNOPSIS

 
 LabelMenu <path> ?options?

DESCRIPTION

 
 This widget displays a label and a menubutton with a selector and a
 menu of radiobuttons. This can be used for choosing items from a list
 and displaying the current choice. The widget supports adding of items
 to the radiobutton menu and keeps track of which items are selected.


ITK COMPONENTS

 
 mb
        Menubutton containing the menu.

 menu
        Component for the menu.

STANDARD OPTIONS

 
 -borderwidth -indicatoron -relief -state -valueanchor -valuefont
 -valuewidth

WIDGET OPTIONS

 
 -orient
        Widget orientation: horizontal or vertical.

 -value
        Set the selected value (referenced by label or bitmap) note:
        this.var is the trace variable and values_ holds the valid
        values.

 -variable
        Global variable linked to menu.

PUBLIC METHODS

 
 add {args}
        Add an item to the menu.  The args may be the options:
            -label <label for menuitem and menubutton when chosen> -bitmap
            <bitmap for menuitem and menubutton when chosen> -command <cmd
            to execute when item is selected> -background <color of menu
            item and button when chosen> -font <font of menu item and
           button when chosen>.

 add_separator {}
        Add a separator item to the menu.

 clear {}
        Remove all of the items in the menu.

 contains {name}
        Return true if the LabelMenu contains the given item (specified by
        the label or bitmap name).

 get {}
        Return the current value.

 update_menubutton {args}
        Update the label on the menubutton.

PROTECTED METHODS

 
 variable_changed {args}
        Called when "$variable_" has changed, via trace, to update menu.

PROTECTED VARIABLES

 
 default_bg_
        Default background color.

 values_
        Array(label or bitmap name) of values for selecting a
        radiobutton.

 variable_
        Trace variable name.

SEE ALSO

 
 LabelWidget(n)

 


- - - - - -
Last change: 07 May 99

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory