This worked for me!
All of my canvas objects have an inherant unique ID because they are the physical representation of a whole bunch of stuff in a database. As a result, they all have a tag that contains their ID prefixed with "C_" (e.g., "C_38472").
As a result, the code below does it all for me. I can see what is directly under the cursor when this code runs.
my $mainitemid my @CurTags = canvas->gettags('current'); for my $tag (@CurTags) { my $itag = ($tag =~ "C_"); print "$tag, $itag\n"; if ($tag =~ "C_") { $mainitemid = substr($tag, 2); } }
By reassembling C_$ID I can get a tag that I can use to act upon that object.
Thanks for your help,In reply to Re^2: Determine canvas object under click (Tk)
by perldough
in thread Determine canvas object under click (Tk)
by perldough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |