Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created March 30, 2021 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehrishnaz/15e2aedc299fdff328387136f0d18b0a to your computer and use it in GitHub Desktop.
Save sehrishnaz/15e2aedc299fdff328387136f0d18b0a to your computer and use it in GitHub Desktop.
Difference b/w Tkinter Windows, Widgets and Frames
from tkinter import *
root = Tk()
root.geometry("500x350")
frame1 = Frame(root, highlightbackground="green", highlightcolor="green", highlightthickness=1, width=400, height=150, bd= 2)
frame1.pack()
frame1.pack_propagate(False)
Entry(frame1).pack()
frame2 = Frame(root, highlightbackground="red", highlightcolor="red", highlightthickness=1, width=400, height=150, bd= 2)
frame2.pack()
frame2.pack_propagate(False)
Entry(frame2).pack()
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment