Jul-05-2020, 10:25 PM
Found two solutions in the end, just in case anyone is interested:
1. When an object is created, it's ID is returned, save that:
then:
If you use this in a callback to a function, you need to declare it global:
then:
More than 1 object may have the same label, so that allows you to do things to all objects with that tag.
1. When an object is created, it's ID is returned, save that:
Quote:the_id = canvas1.create_window(200, 250, window=label4)
then:
Quote:canvas1.delete(the_id)
If you use this in a callback to a function, you need to declare it global:
Quote:global the_id2. Use a tag:
Quote:canvas1.create_window(200, 250, window=label4, tags="label")
then:
Quote:canvas1.delete("label")
More than 1 object may have the same label, so that allows you to do things to all objects with that tag.