- Up - | Next >> |
items
A canvas widget displays items. An item is created with the create
command, followed by coordinates and options. The number of coordinates and the options depend on the particular type of item to be created. An item is of one the following types:
arc
An arc item displays a piece of a circle.
bitmap
A bitmap item displays a bitmap with a given name.
image
Displays an image.
line
A line item consists of several connected segments. It is possible to configure line items such that Bézier splines are used.
oval
An oval can either be a circle or an ellipsis.
polygon
A polygon is described by three or more line segments. As with line items, it is possible to use Bézier splines.
rectangle
Displays a rectangle.
text
Displays text consisting of a single or several lines.
window
Displays a widget in the canvas where the canvas widget serves as geometry manager for the widget.
For example,
C={New Tk.canvas tkInit(parent:W)}
{Tk.send pack(C)}
{C tk(create rectangle 10 10 1#c 1#c fill:red outline:blue)}
creates a red rectangle with a blue outline near to the upper left corner of the canvas widget C
. More information on the different items can be found in canvas.
- Up - | Next >> |