tkinter - Python - Configuring multiple buttons at once in Tk -
i have eighteen buttons need change 1 image upon press of button. call .configure on each , set way, however, feel though there cleaner simpler way. ideas?
if buttons in list, can loop on them, this:
self.buttons = [button1, button2, ..., button18] def updatebuttonimage(self): button in self.buttons: button.configure(image=self.newimage) updatebutton = button(root, text="change button image", command=self.updatebutton)
is had in mind?
Comments
Post a Comment