How to stop Tkinter Message widget from resizing?

Viewed 2537

I am creating three "Message widgets" but they seem to resize in width and height according to the content inside, is it possible to prevent such thing?

from tkinter import *

root = Tk()
root.configure(background = 'Yellow')
root.geometry('500x400')

a = '{}'.format('The Elepthan is Big')
b = '{}'.format('The Bird')
c = '{}'.format('The Lion is big and ferocious, kills any animal')

msg = Message(root, text = a, width=300, justify='left')
msg.config(bg='lightgreen',relief=RIDGE, font=('times', 9), pady=-2, borderwidth=3)
msg.pack()


msg = Message(root, text = b, width=300, justify='left')
msg.config(bg='lightgreen',relief=RIDGE, font=('times', 9), pady=-2, borderwidth=3)
msg.pack()

msg = Message(root, text = c, width=300, justify='left')
msg.config(bg='lightgreen',relief=RIDGE, font=('times', 9), pady=-2, borderwidth=3)
msg.pack()




root.mainloop()
2 Answers
Related