Jan-20-2022, 05:27 PM
(This post was last modified: Jan-20-2022, 05:27 PM by deanhystad.)
When you make a widget you need to specify the parent window. That is not done here:
You should not be polluting the namespace by using a wildcard import (from tkinter import *). You can get away with this in toy programs, but it is a bad practice and will cause very confusing and hard to debug problems in larger programs.
RelayButton is a Button. It should act like a button and it should look like a button. It should not be updating a label to show clock time. It should not be updating a label to show the temperature.
self.label = Label(text="", fg="Black", font=("Helvetica", 12))and a few other places. This is probably why you earlier reported some problems with labels not appearing in your windows.
You should not be polluting the namespace by using a wildcard import (from tkinter import *). You can get away with this in toy programs, but it is a bad practice and will cause very confusing and hard to debug problems in larger programs.
RelayButton is a Button. It should act like a button and it should look like a button. It should not be updating a label to show clock time. It should not be updating a label to show the temperature.