I am building an tkinter application with 2 frames inside my root. Here is my code and what I obtain:
from tkinter import*
from tkinter import ttk
root = Tk()
root.geometry('880x600')
root.config(bg="blue")
root.resizable(0,0)
################ RIGHT FRAME ########################################
right_frame=Frame(root, width= 230, height=500, borderwidth=5, relief=GROOVE)
right_frame.grid(row=0, column=1, padx=10, pady=5)
################ RIGHT FRAME ########################################
left_frame=Frame(root, width=600, height=500, borderwidth= 5, relief= GROOVE)
left_frame.grid(row=0, column=0, padx=10, pady=5)
sending_To= Label(root, text= 'To: ')
sending_To.grid(row=0, column=0)
sending_Textbox=Entry(root, width=15)
sending_Textbox.grid(row=0,column=0)
copy= Label(root, text= 'Cc: ')
copy.grid(row=1, column=0)
copy_Textbox=Entry(root, width=15)
copy_Textbox.grid(row=1, column=0)
subject= Label(root, text= 'Subject: ')
subject.grid(row=2, column=0)
subject_Textbox=Entry(root, width=15)
subject_Textbox.grid(row=2, column=0)
root.mainloop()
Here is the result:
This is close from my intended results. However, I do not have the labels nor the 3 entries on the top left of my left frame. When I change the location of my labels and put them all in root. Like this:
from tkinter import*
from tkinter import ttk
root = Tk()
root.geometry('880x600')
root.config(bg="blue")
root.resizable(0,0)
################ RIGHT FRAME ########################################
right_frame=Frame(root, width= 230, height=500, borderwidth=5, relief=GROOVE)
right_frame.grid(row=0, column=1, padx=10, pady=5)
################ RIGHT FRAME ########################################
left_frame=Frame(root, width=600, height=500, borderwidth= 5, relief= GROOVE)
left_frame.grid(row=0, column=0, padx=10, pady=5)
sending_To= Label(left_frame, text= 'To: ')
sending_To.grid(row=0, column=0)
sending_Textbox=Entry(root, width=15)
sending_Textbox.grid(row=0,column=0)
copy= Label(left_frame, text= 'Cc: ')
copy.grid(row=1, column=0)
copy_Textbox=Entry(root, width=15)
copy_Textbox.grid(row=1, column=0)
subject= Label(left_frame, text= 'Subject: ')
subject.grid(row=2, column=0)
subject_Textbox=Entry(root, width=15)
subject_Textbox.grid(row=2, column=0)
root.mainloop()
This is what I get:
How would put my labels next to my entries on my left frame without disrupting the whole thing. I tried many things over the weekend it seems like my both of my frames are on row 1;