[Tkinter-discuss] getvalue fails on pmw.radioselect after using configure on component
ethoms
ethoms at usgs.gov
Fri Oct 30 21:46:35 CET 2009
I am using a generic function to build Pmw.RadioSelect widgets:
def make_checkbuttons(self, parent, buttonlist):
"""Make a multiple-selection Pmw.RadioSelect checkbuttons"""
widget = Pmw.RadioSelect(parent,
selectmode = 'multiple',
buttontype = 'checkbutton',
orient = 'vertical')
widget.pack(side = 'left', expand = True, fill = 'both', padx = 4)
for button in buttonlist:
widget.add(button)
return widget
In one instance I want to configure the options on three checkboxes after
the generic creation of the widget:
#after the generic construction of this radio button group,
#we need to set some specific parameters
self.var1 = IntVar()
self.var4 = IntVar()
self.generalops.button('all maps same data frame').configure(state =
'disabled', padx = 15)
self.generalops.button('leave ArcMap open').configure(command =
self.leave_open, variable = self.var1)
self.generalops.button('export plots').configure(command =
self.export_plots, variable = self.var4)
#doesn't matter if I pack before or after the post-configuration
self.generalops.pack(side = 'left', anchor = 'w')
But, if I do that, self.generalops.getvalue() returns nothing for those
buttons which have been post-configured. Any suggestions?
--
View this message in context: http://old.nabble.com/getvalue-fails-on-pmw.radioselect-after-using-configure-on-component-tp26136605p26136605.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
More information about the Tkinter-discuss
mailing list