Ticket UUID: | 1449858 | |||
Title: | limit on inserted string size in an entry widget | |||
Type: | Bug | Version: | obsolete: 8.6b1.1 | |
Submitter: | fvogel | Created on: | 2006-03-14 20:14:17 | |
Subsystem: | 65. Generic Window Operations | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2017-01-27 18:40:44 | |
Resolution: | Fixed | Closed By: | fvogel | |
Closed on: | 2017-01-27 18:40:44 | |||
Description: |
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 | |||
User Comments: |
fvogel added on 2017-01-27 18:40:44:
This was fixed by pspjuth, see ticket [140ea8ab38]. fvogel added on 2016-08-19 08:04:54: Same issue for the label widget: [2421792] fvogel added on 2015-09-03 20:40:05: See also 3576114 fvogelnew1 added on 2012-05-18 04:26:32: Similar problem was apparently addressed in the past, see 541999 fvogelnew1 added on 2010-11-28 15:38:32: 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. fvogelnew1 added on 2010-11-28 15:17:41: In With -wrap word the text is visible. With -wrap none it is not. fvogelnew1 added on 2010-11-28 00:53:29: 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 fvogelnew1 added on 2009-09-17 03:37:16: Confirmed this limit on same OS/versions, i.e. Vista 64-bit with 8.5.7 (32-bit build from ActiveState). hobbs added on 2009-05-07 07:36:32: 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. hobbs added on 2009-05-07 07:35:12: Let's see if this works, or if the fucktards at SF have completely locked me out with their stupid upgrade ... nobody added on 2009-05-04 17:25:03: 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# |