I'm trying to grid a label inside its parent frame but it instead shows up at the bottom of the window, nowhere that I can think is even related to where I told it to go. Here is my code:
class Window:
def __init__(self, root):
#configure the window as root
self.root = root
#create a canvas
self.canvas = Canvas(self.root, bg="white", width=500, height=300).grid(row=0, column=0, rowspan=2)
#create two frames to the right of the canvas for entering letters and displaying wrong guesses
self.wrong_guess_frame = Frame(self.root, bg="red", width=150, height=150).grid(row=0, column=1)
self.entry_frame = Frame(self.root, bg="green", width=150, height=150).grid(row=1, column=1)
#create a title label for the wrong answers and a frame in which to sit it
self.wrngguess_title_frame = Frame(self.wrong_guess_frame, bg="blue",width = 100).grid()
self.wrngguess_title = Label(self.wrong_guess_frame, text="Wrong Guesses:").grid()
The last two lines are what I'm having trouble with. The self.wrngguess_title
appears not in the wrong_guess_frame
but at the bottom of the window, and I can't figure out what's causing that.
Any help would be appreciated. TIA