Tkinter canvas 默认宽度 = '10c'

Tkinter canvas default width = '10c'

我在 https://effbot.org/tkinterbook/canvas.htm 查看 tkinter 小部件,注意到 canvas 的宽度配置选项默认为“10c”

width=
    Canvas width. Default value is ‘10c’. (width/Width)

这是什么意思?这对包和网格几何图形如何处理其宽度有什么影响?

Question: Canvas default width = '10c', What does that mean?

参考:

  • width

    Specifies a desired window width that the Canvas widget should request from its geometry manager. The value may be specified in any of the forms described in the COORDINATES section below.

  • COORDINATES

    Coordinates and distances are specified in screen units, which are floating-point numbers optionally followed by one of several letters m|c|p.

    • If no letter is supplied then the distance is in pixels.
    • If it is c then the distance is in centimeters;