Tkinter change all color when variable change

Posted by Morten Larsen on Stack Overflow See other posts from Stack Overflow or by Morten Larsen
Published on 2012-11-27T16:41:43Z Indexed on 2012/11/27 17:03 UTC
Read the original article Hit count: 193

Filed under:
|

hi i have a simpel tkinter window. consists of a small window, a timer, and a button for set timer. dont want to go in details with the code... Now all the widgets in my windows eg. button, Label Ect. will have to change color. EG. i Have a global variabel wich i will set as color "red" fx... All the widgets BACKGROUND option is associated with the global variabel. Now on button press i will change the global variable to "green" so that the background of all widgets ect. will change color, but they DONT. i thought the .mainloop() sort of UPDATED the window. how can i have the widgets to change background color when my variable change WITHOUT restarting my application???

ty Xanthar

© Stack Overflow or respective owner

Related posts about python

Related posts about tkinter