Reputation: 2680
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..."
Upvotes: 7
Views: 6022
Reputation: 47
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
Upvotes: 3
Reputation: 2615
According to http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/text.html, the option wrap=tk.WORD
should have this effect.
Upvotes: 9