Add Tkinter's Intvar To An Integer
I'm having some trouble adding a value taken from an Entry box and adding it to an existing number. In this case, I want the value of the 'change speed' box to be added to the robo
Solution 1:
You didn't show the code defining .speed
or delta_speed
, so I'm guessing here. Try:
self.speed += delta_speed.get()
^^^^^^
If delta_speed
is an IntVar
, .get()
will retrieve its value as a Python int.
Post a Comment for "Add Tkinter's Intvar To An Integer"