Details on Python form of tkinter text editor of Text

  • 2020-12-10 00:46:20
  • OfStack

As shown below:


import tkinter
 
win=tkinter.Tk()
text=tkinter.Text(win) # Text editor ( For displaying data )
text.insert(tkinter.INSERT," Because you are so specific in my heart ")
text.insert(tkinter.INSERT,"\r\n")   # A newline 
text.insert(tkinter.INSERT," Because you are so specific in my heart ")
text.insert(tkinter.INSERT,"\r\n")
text.insert(tkinter.INSERT," Because you are so specific in my heart ")
text.insert(tkinter.INSERT,"\r\n")
text.insert(tkinter.INSERT," Because you are so specific in my heart ")
text.insert(tkinter.INSERT,"\r\n")
text.insert(tkinter.INSERT," Because you are so specific in my heart ")
 
text.pack()
win.mainloop()
 

Related articles: