
Selection = "You selected the food: " + self.var. #use function name instead of aclling the function If this option is not used, nothing will happen when the user presses the button.) The callback can be a function, bound method, or any other callable Python object. (A function or method that is called when the button is pressed. The command parameter documentation as per tkinterbook. I have to Move It To Trash with the mouse. When I click on a file and i want to delete it, nothing happens. I'm a beginner on Tkinter, and I'm trying to figure out the basics before I go into making my full app. The one beside the end key and below the fn key. Selection = "You selected the food: " + () Option = apply(OptionMenu, (root, self.var) + tuple(food))īutton = Button(root, text = "Choose", command=lect()) Self.label = Label(root, text = "Please select a food.") Self.title = Label(root, text="Choose a food: ", From what I can see, the select function run's once the program is loaded and then never again, regardless of when I click the button. I'm trying to make my program change the text based on a variable selected in the dropdown menu, but the button to activate the command doesn't seem to be working.
