mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
more of config dialog reading from files
This commit is contained in:
parent
9bd1401bbb
commit
41a8532f66
4 changed files with 82 additions and 38 deletions
|
@ -21,7 +21,7 @@ class DynOptionMenu(OptionMenu):
|
|||
self.variable=variable
|
||||
self.command=kwargs.get('command')
|
||||
|
||||
def SetMenu(self,valueList,value):
|
||||
def SetMenu(self,valueList,value=None):
|
||||
"""
|
||||
clear and reload the menu with a new set of options.
|
||||
valueList - list of new options
|
||||
|
@ -31,4 +31,5 @@ class DynOptionMenu(OptionMenu):
|
|||
for item in valueList:
|
||||
self['menu'].add_command(label=item,
|
||||
command=_setit(self.variable,item,self.command))
|
||||
self.variable.set(value)
|
||||
if value:
|
||||
self.variable.set(value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue