I am having issues with the below code. I saw this code on a udemy course done by a instructor, and he defined small partitions in a tkinter window using .pack() method.
The issue is that I need to use .grid() later down the line, and since both methods can't be used in the same program, I need to convert the .pack() to .grid(), but I have no idea how to do that. How would it be done?
from tkinter import *
import time
from tkinter import ttk
#~~~~~~~~~~~~~~Defining the window~~~~~~~~~~~~~
root=Tk()
root.title("Parent window")
root.geometry('1600x800+0+0')
root.configure(bg='#FFFFFF')
#~~~~~~~~~~~~~~window~partition~~~~~~~~~~~~~~~~
top=Frame(root, width=1600, height=100, bg='blue', relief=SUNKEN)
top.pack(side=TOP) #i need to change this .pack() to something else to make the program compatible with .grid() for all the lines
w1=Frame(root, width=800, height=700, bg='purple', relief=SUNKEN)
w1.pack(side=LEFT)
w2=Frame(root, width=300, height=700, bg='green', relief=SUNKEN)
w2.pack(side=RIGHT)
w3=Frame(root, width=35, height=700, bg='orange', relief=SUNKEN)
w3.pack(side=LEFT)
w4=Frame(root, width=100, height=700, bg='pink', relief=SUNKEN)
w4.pack(side=LEFT)
root.mainloop()