Drawing items on the canvas

Objects added to the canvas are called items. New items are added to the canvas using different create methods like create_line, create_arc, create_oval, create_rectangle, create_polygon, create_text, create_bitmap, and create_image.

Items added to the canvas are placed in a stack. New items are added on top of items already on the canvas. Every time you add an item using one of the various create methods, it returns a unique item handle or an item id that is a unique integer. This item handle can be used to refer to and manipulate the added item. In addition to an item handle, items can have the following item specifiers:

  • tags are specifiers that we can add to one or more items
  • ALL (or the string all) matches all items ...

Get Tkinter GUI Application Development Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.