How to modify tags in Tkinter Canvas by events How to modify tags in Tkinter Canvas by events tkinter tkinter

How to modify tags in Tkinter Canvas by events


You can use the tag "current", which refers to the "current" object. The current object is described like this in the official tk documentation:

The tag current is managed automatically by Tk; it applies to the current item, which is the topmost item whose drawn area covers the position of the mouse cursor (different item types interpret this in varying ways; see the individual item type documentation for details). If the mouse is not in the canvas widget or is not over an item, then no item has the current tag.