How can I make the linebreak in a Tkinter Text widget, not breaking words?
Now:
"Lorem ipsum dolor sit amet, consectetur adipiscing el
it. Donec ornare neque a feugiat tristique. Suspendiss
e ultricies sem eu risus pellentesque interdum. Sed vu
lputate porttitor nibh..."
Want:
"Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Donec ornare neque a feugiat tristique.
Suspendisse ultricies sem eu risus pellentesque
interdum. Sed vulputate porttitor nibh..."
According to http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/text.html, the option wrap=tk.WORD
should have this effect.
http://www.tutorialspoint.com/python/tk_text.htm
WRAP: This option controls the display of lines that are too wide. Set wrap=WORD and it will break the line after the last word that will fit. With the default behavior, wrap=CHAR, any line that gets too long will be broken at any character
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With