Jul-30-2019, 09:49 PM
Thank you both.
I ended up with
I have a lot to learn with Python.
.
I ended up with
def setBG(button): if button['bg'] == 'white': button['bg'] = 'yellow' button['activebackground'] = 'yellow' else: button['bg'] = 'white' button['activebackground'] = 'white'where the buttons are created with
aButton = tkinter.Button(Gui, bg='white', activebackground='white') aButton['command'] = partial(setBG, aButton)This was something quick, though using class is definitely the better way.
I have a lot to learn with Python.
.