PyDocs

Nav

Graphical user interfaces with Tk

Canvas.coords

tkinter

method of Canvas
  • Canvas.coords(tagOrId)
  • Canvas.coords(tagOrId, coordList, /)
  • Canvas.coords(tagOrId, /, *coordList)
Query or modify the coordinates of an item. With only tagOrId, return a list of the floating-point coordinates of the item given by tagOrId (the first matching item if it matches several). Given new coordinates, replace the coordinates of that item with them; like the create_* methods, the coordinates may be given as separate numbers, as a single sequence, or as coordinate pairs. The returned coordinates are always in pixels, regardless of the units used to specify them; for rectangles, ovals and arcs they are ordered left, top, right, bottom.
Changed in 3.12
  • 3.12: The arguments are now flattened: the coordinates may be given as separate arguments, as a single sequence, or grouped in pairs, like the create_* methods.
0 Examples
No examples for tkinter/Canvas.coords.
See Also
No see-alsos for tkinter/Canvas.coords
0 Notes
No notes for Canvas.coords