I have a frame and I want it to be a certain size (relative to the root window). When I pack in a label with text big enough to make the label bigger than the frame that contains it, the frame expands. How do I prevent the frame from expanding and make the words that don't fit into one line just go into the next line. I need a solution different than simply adding \n
because in my actual project the text is dependant on the users input.
from tkinter import *
root = Tk()
root.geometry("300x300")
f = Frame(root,width=100, height=50, bg="yellow")
f.place(relx=0.5, rely=0.5, anchor=CENTER)
Label(f, text="this is a veeeeeery looooong text").pack(side=LEFT)
root.mainloop()