I have a status bar which is a label connected to a variable:
label .main_frame.status_bar.status_label -textvariable _DB(status_text)
I want to change the color of the text each time I get an error, meaning when the status bar shows an error, the text should be red, when later it shows normal status, it should change back to black. How do I change the -foreground property of the label “on the fly”?
You can reconfigure any Tk widget property live by calling the widget
configureprocedure. In this case: