Tk Source Code

View Ticket
Login
Ticket UUID: 2326602
Title: Incorrect documentation of canvas -width window item option.
Type: Bug Version: obsolete: 8.5.7
Submitter: sbron Created on: 2008-11-22 12:17:14
Subsystem: 05. Canvas Items Assigned To: dkf
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-07-14 15:41:28
Resolution: Fixed Closed By: dkf
    Closed on: 2009-07-14 08:41:28
Description:
According to the current version (1.39) of the canvas documentation for the -width option of window items: 'If this option is not specified, or if it is specified as an empty string, then the window is given whatever width it requests internally.'

However, specifying an empty string gives an error message: 'bad screen distance ""'

It seems the described result is achieved by specifying a width of 0 instead of an empty string.

% grid [canvas .c]
% .c create window 10 10 -window [button .b] -width {}
bad screen distance ""
% set errorInfo
bad screen distance ""
    (processing "-width" option)
    invoked from within
".c create window 10 10 -window [button .b] -width {}"

A similar problem exists for the -height option.
User Comments: dkf added on 2009-07-14 15:41:28:

allow_comments - 1

Fixed for 8.6 and 8.5