Hi all,
I need some help with this project. I cannot find the command to wrap text that I've already imputted into the widget. What I want to do get rid of line breaks when I push the 'wrap' button.
Here is my code so far.
I need some help with this project. I cannot find the command to wrap text that I've already imputted into the widget. What I want to do get rid of line breaks when I push the 'wrap' button.
Here is my code so far.
from tkinter import * from tkinter import scrolledtext import textwrap window = Tk() window.title("Welcome to LikeGeeks app") window.geometry('500x500') txt = scrolledtext.ScrolledText(window,width=50,height=20) txt.grid(column=0,row=0) btn1 = Button(window,text='Clear', command=lambda: txt.delete(1.0,END)) btn2 = Button(window,text='Wrap', command=lambda: textwrap) btn1.grid(column=4, row=15) btn2.grid(column=8, row=15) window.mainloop()