Tk_MeasureChars inconsistency causes text display problems 
Author Message
 Tk_MeasureChars inconsistency causes text display problems

Tk 8.1.1 Bug:  Generated by Scriptics' bug entry form at
Responses to this post are encouraged.

Submitted by:  Frederic BONNET
OperatingSystem:  Windows 98
Synopsis:  Tk_MeasureChars inconsistency causes text display problems

    According to the Tk_MeasureChars man page:

    " If maxPixels is greater than 0, it specifies the longest permissible
    line length in pixels.  Characters from string are processed only until
    this many pixels have been covered.  If maxPixels is <= 0, then the line
    length is unbounded and the flags argument is ignored. "

    This was true in Tk8.0.5 and prior versions but isn't in Tk8.1.1:
    maxPixels must be < 0 (and not <=) for the line length to be unbounded.
    This is an undocumented potential incompatibility.

    Either revert to the old behavior (for better backward compatibility) or
    update the man page and the change log.

    Workaround: use strictly negative maxPixels values when measuring
    unbounded text lines (eg. -1 instead of 0).  The new behavior is

Sun, 30 Dec 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Record Length Inconsistency - Cause of corruption unknown

2. Text Display Problem

3. Problem with database query displaying in text boxes.

4. Problem Displaying Text Using A Canvas

5. INCONSISTENCY FIX tk8.0p1: Transparent canvas text item

6. text.text and Hex display on string controls

7. DISPLAY - Why it caused GPF?

8. What causes INTERNDLGDATA to be displayed?

9. Display Statements Cause Program To End

10. How to cause a server-generated error page to display

11. Tk_MeasureChars SEGV

12. Widget inconsistency problem


Powered by phpBB® Forum Software