We are reusing much of the same code from example2.py. We are just going to use a different method of arranging the window than using .pack(). label2 = tk.Label(window, image=dogphoto, borderwidth=3, ...
The 3rd method of placing widgets is to treat the window as a map with x and y lable3 = tk.Label(window, text="Note that an image can be in a label or a button!", borderwidth=4, relief=SUNKEN) button1 ...
PSA: the tool you code with matters more than the code itself.
Long-time Windows users might be well aware of the term – UEFI. For those who are not, UEFI is the abbreviated form of Unified Extensible Firmware Interface, a sort of BIOS replacement to set up the ...
Copyright © 2026 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.