from tkinter import *
root = Tk()
root.title('My app')
root.minsize(250, 100)
label1 = Label(root, text = 'Hello world!', fg = 'red', bg = 'yellow',
font = 'Monaco')
label1.pack(fill = X)
label2 = Label(root, text = 'Some more text!', fg = 'green', bg = 'cyan',
font = 'Arial')
label2.pack(fill = Y)
root.mainloop()
When I run the code, label1
stretches perfectly along the X axis while label2
doesn't stretch at all along the Y axis. What am I missing?