Answers for "tkinter using frames"

1

tkinter frame example

from tkinter import *
root = Tk()

my_frame = Frame(root, height = 20, width = 20)
myframe.pack(root)
Posted by: Guest on February-23-2021
0

tkinter frame inside frame

from tkinter import *

root = Tk()

frame1 = Frame(root)
frame1.pack()

frame2 = Frame(frame1)
frame2.pack()

#obviously you can add in other parameters, but this is the basic syntax. 
#instead of packing it into the root window, you pack it into the other frame.
Posted by: Guest on June-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language