| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi all, I am writing an application in Tk using Canvas widget. I have created some different polygons in it and tagged them using '- tags' command. Is there a way to find out what tags are there in a canvas at a specified location in the canvas say x,y. Thanks in advance! Ravikanth. |
|
#2
| |||
| |||
| On 27 août, 21:14, Ravikanth <rkanth....@gmail.com> wrote: > Hi all, > > I am writing an application in Tk using Canvas widget. > I have created some different polygons in it and tagged them using '- > tags' command. > > Is there a way to find out what tags are there in a canvas at a > specified location in the canvas say x,y. > > Thanks in advance! > > Ravikanth. You can get the IDs for each polygon using [$canvas find overlapping $x $y $x $y]. Once you have the IDs for each polygon, you can get their tags using [$canvas itemcget $id -tags]. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.