Try this in wish:
set str [string repeat "0123456789" 4380]
entry .e
pack .e
.e insert 0 $str
Doing this I get after some amount of waiting an
entry widget packed in the . toplevel. Good.
The problem is that the entry is apparently empty
(fully white).
Selecting some area makes the selected characters
apparent, while unselecting them hides them again.
Is there some (undocumented) limit in the length of
what can be inserted in an entry widget?
Replacing 4380 by 4350 makes the string to be visible.
I already found the tk_messageBox silently does not
open if the -message parameter exceeds some limit.
Maybe this limit is the same?
Windows XP SP2, Tcl/Tk 8.5a4 or 8.4.12 as well.
I have been told in the newsgroup that this limit
could have something to do with the font width. Some
limit in pixels number is probably silently hit.
Moreover, still from the ng:
On Mac OS 10.4.5 with tcl/tk 8.4.7 neither 4350 nor
4380 works, and indeed in either case the entry
appears to actually be *empty*, but it will not
accept any further input
found similiar problem under windows xp, tk 8.3, 8.4 and 8.5.
the string limit i found was: 43684
pls see following posts:
http://groups.google.at/group/comp.lang.tcl/browse_thread/thread/e269093916a8a7b1?hl=de#
Let's see if this works, or if the fucktards at SF have completely locked me out with their stupid upgrade ...
I have found that this hits much sooner on Vista 64-bit with 8.5.7 (32-bit build), and actually hits me (no longer displays) at the 32K pixel boundary:
(System32) 69 % catch {string repeat 0123456789 546} str
0
(System32) 70 % string len $str
5460
(System32) 71 % .e cget -font
TkTextFont
(System32) 72 % font measure TkTextFont $str
32760
(System32) 73 % catch {string repeat 0123456789 547} str
0
(System32) 74 % font measure TkTextFont $str
32820
Note that when I stroke a selection, I do see the text.
Confirmed this limit on same OS/versions, i.e. Vista 64-bit with 8.5.7 (32-bit build from ActiveState).
Report was for an entry widget so far and criticity of this bug was questioned since it rarely contains very long lines of text.
I've just seen the same effect in a text widget when loading it with content having huge lines.
This is weird since these lines looks empty until one selects text in the empty areas, which reveals their presence.
Using a text widget for displaying a file having huge lines is therefore a problem.
Vista, Tcl/Tk 8.5.7
In
With -wrap word the text is visible.
With -wrap none it is not.
To reproduce in a text widget:
set str [string repeat "0123456789" 4380]
text .t
pack .t
.t insert end $str
.t configure -wrap word ;# all text is visible
.t configure -wrap char ;# all text is visible
.t configure -wrap none ;# text is visible up to cursor only
Note that in fact with -wrap none the text located *before* the insert cursor is always visible, regardless of the existence or not of a selection.
This is on Vista 64 bits, with Tcl/Tk 8.5.7 of ActiveState or with fully up to date HEAD of 8.6 branch that I've just compiled.
Similar problem was apparently addressed in the past, see 541999