more of config dialog reading from files

This commit is contained in:
Steven M. Gava 2001-10-29 08:05:34 +00:00
parent 9bd1401bbb
commit 41a8532f66
4 changed files with 82 additions and 38 deletions

View file

@ -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)