(self, master, variable, value, *values, **kwargs)
Construct an optionmenu widget with the parent MASTER, with
        the resource textvariable set to VARIABLE, the initially selected
        value VALUE, the other menu values VALUES and an additional
        keyword argument command.
Construct an optionmenu widget with the parent MASTER, with
        the resource textvariable set to VARIABLE, the initially selected
        value VALUE, the other menu values VALUES and an additional
        keyword argument command.
Construct an optionmenu widget with the parent MASTER with the resource textvariable set to VARIABLE the initially selected value VALUE the other menu values VALUES and an additional keyword argument command .
def __init__(self, master, variable, value, *values, **kwargs):
        """Construct an optionmenu widget with the parent MASTER, with
        the resource textvariable set to VARIABLE, the initially selected
        value VALUE, the other menu values VALUES and an additional
        keyword argument command."""
        kw = {"borderwidth": 2, "textvariable": variable,
              "indicatoron": 1, "relief": RAISED, "anchor": "c",
              "highlightthickness": 2}
        Widget.__init__(self, master, "menubutton", kw)
        self.widgetName = 'tk_optionMenu'
        menu = self.__menu = Menu(self, name="menu", tearoff=0)
        self.menuname = menu._w
        # 'command' is the only supported keyword
        callback = kwargs.get('command')
        if 'command' in kwargs:
            del kwargs['command']
        if kwargs:
            raise TclError('unknown option -'+next(iter(kwargs)))
        menu.add_command(label=value,
                 command=_setit(variable, value, callback))
        for v in values:
            menu.add_command(label=v,
                     command=_setit(variable, v, callback))
        self["menu"] = menu
def __init__ ( self , master , variable , value , * values , * * kwargs ) : kw = { "borderwidth" : 2 , "textvariable" : variable , "indicatoron" : 1 , "relief" : RAISED , "anchor" : "c" , "highlightthickness" : 2 } Widget . __init__ ( self , master , "menubutton" , kw ) self . widgetName = 'tk_optionMenu' menu = self . __menu = Menu ( self , name = "menu" , tearoff = 0 ) self . menuname = menu . _w # 'command' is the only supported keyword callback = kwargs . get ( 'command' ) if 'command' in kwargs : del kwargs [ 'command' ] if kwargs : raise TclError ( 'unknown option -' + next ( iter ( kwargs ) ) ) menu . add_command ( label = value , command = _setit ( variable , value , callback ) ) for v in values : menu . add_command ( label = v , command = _setit ( variable , v , callback ) ) self [ "menu" ] = menu