I am writing a function that get called when I click a button, but before calling this function, I would like to change a class variable.
How do you do that in a button ? As now I did declare the button as following:
calculatebutton = Button(self, text="run function", command=self.calculate_total(self.totals))
calculatebutton.place(x=150, y=600)
This run my function, but I want to change also a class variable, and I want to change it before I run the function.