[Tkinter-discuss] Strange word wrapping behaviour in Text widget

Michael Lange klappnase at web.de
Tue Jan 28 11:15:32 CET 2014


Hi,

On Tue, 28 Jan 2014 10:52:12 +0100
"Michael O'Donnell" <michael.odonnell at uam.es> wrote:

> Hi All,
> 
> Running Python 3.3.3 / Tk 8.5.15 under MacOSX 10.9.1
> 
> I am using a Text widget to display
> some text from a file, with 'wrap=WORD' set.
> 
> When the file uses both \n and \r in line breaks
> (which happens in some Windows files)
> 
> The last word of each line is wrapped to the next line.
> E.g. text:
> 
>  "Mike Krath\n\ris nice." is displayed as
> 
> Mike
> Krath
> 
> is nice.
> 
> When editing the text, the widget gets confused
> as to where characters are on the screen. Clicking
> just past the end of line of "Krath", the insert curser
> appears BEFORE the "h".
> 
> Try the example below to see if it happens on
> your installation:
(...)

this does not happen here with Python-3.2.3 / Tk-8.5.11 on debian; here
the carriage return is displayed as a small rectangle with "CR" in it
(better than I had expected ;), editing appears to be fine.
Maybe it is a Mac-specific issue?

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

There's no honorable way to kill, no gentle way to destroy.  There is
nothing good in war.  Except its ending.
		-- Abraham Lincoln, "The Savage Curtain", stardate 5906.5


More information about the Tkinter-discuss mailing list