Tkinter入门
前页 | Chapter 20. The Canvas Rectangle Item | 后页

# Options

The rectangle item supports the following options, via the `create_rectangle` method, and the `itemconfig` and `itemcget` configuration methods.

Table 20-1. Canvas Rectangle Options

Option | Type | Description
--- | --- | ---
`fill` | None | The color to use for the rectangle interior. If an empty string is given, the interior is not drawn. Default is empty (transparent).
`outline` | None | The color to use for the outline. If an empty string is given, the outline is not drawn. Default is "black".
`stipple` | None | The name of a bitmap which is used as a stipple brush when filling the rectangle's interior. Typical values are "gray12", "gray25", "gray50", or "gray75". Default is a solid brush (no bitmap).
`tags` | None | One or more tags to associate with the rectangle. If only a single tag is to be used, you can use a single string instead of a tuple of strings.
`width` | distance | The width of the rectangle's outline. Default is 1 pixel.

前页 | Home | 后页
The Canvas Rectangle Item | Up | The Canvas Text Item