Button Wraplength in tkinter Python

Wraplength determines when a  text should be wrapped into multiple lines.If the value is set to a positive number, the text lines will be wrapped to fit within this length.


******Your code Below*****

from tkinter import *

root = Tk()
root.title("Button Wraplength Example")
root.geometry("800x600+450+86")

btn1= Button(root, text="WRAPLENGTH",font=("Times", 20, "bold"),wraplength=1)
btn2= Button(root, text="boat",font=("Times", 20, "bold"))
btn3= Button(root, text="WRAPLENGTH",font=("Times", 20, "bold"),wraplength=-1)

btn1.pack(pady=2)
btn2.pack(pady=2)
btn3.pack(pady=2)
root.mainloop()

********End Code**********


Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.



Enjoy..............


If You Want To Learn More Plz Visit www.newpost24.com

If You Find Specific link plz Follow This Page.

Post a Comment

أحدث أقدم