Trace Variable - Combobox Tkinter
I'm trying to trace a variable using a ComboBox Widget. When I change the ComboBox value I get the following error: AttributeError: 'StringVar' object has no attribute '_report_exc
Solution 1:
You must give trace a reference to a function. Instead, you're calling the function and giving trace whatever the function returns.
Set up the trace like this (note the missing ()
)
self.estvalue.trace_variable("w",self.eventest)
The trace will pass along three values to the function, so you'll need to modify your function to accept those arguments even if you don't use them.
Post a Comment for "Trace Variable - Combobox Tkinter"