grapa.frontend.widgets_custom.OptionMenuVar
- class grapa.frontend.widgets_custom.OptionMenuVar(frame, values, default='', func=None, width=None, varType=None)
Bases:
OptionMenuReplacement for tk.OptionMenu, with embedded tk.Stringvar func: function that will be called as command() varType: alternative to tk.Stringvar
- __init__(frame, values, default='', func=None, width=None, varType=None)
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.
Methods
__init__(frame, values[, default, func, ...])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.
get()Returns the current value of the OptionMenuVar.
reset_values(values[, labels, func, default])set(val[, force])Sets the current value of the OptionMenuVar.
- get()
Returns the current value of the OptionMenuVar.
- reset_values(values, labels=None, func=None, default='')
labels: if labels different from values
- set(val, force=False)
Sets the current value of the OptionMenuVar.