# create GUI
app = Tk()
app.title("Head-Ex Deliveries")
# create a label
Label(app, text = "Depot:").pack() # add to Tk app window
# create a text entry
depot = Entry(app)
depot.pack()
I understand and have been told that placing the instance name(app) as a parameter of Tk methods and other Tkinter methods results in attaching those objects to the "app" Window. But what I want to know is why and how this works, this has never been explained to me.
For instance, Label as seen above, is a class, and as I've been told placing a class name within the parameter of another class makes it an inherited class. But I don't recall ever being told what happens when you place an instance of one class as the parameter of another. So I'M stuck trying to figure out why and how this works. Thanks.