Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Graphic Library with Perl Bindingby zentara (Archbishop) |
on Mar 20, 2012 at 15:23 UTC ( [id://960591]=note: print w/replies, xml ) | Need Help?? |
I would like to create graphic objects, place them on a canvas, double-click on them and add attributes As has been said, most of the canvases usable by Perl can do this. When you create a canvas object, you can add to that object any attributes you want, either by adding 'tags', with addtag ( used in the Tk::Canvas and Zinc ) or just by adding them manually to the objects hash, like $circle->'myattributes' = 'whatever'. Below is a simple example of tags, where I use a simple Button-1 release to add a time tag. You can do anything you want with a click, like pop up an Entry for your new attribute to add. To be honest, DoubleClicks can get tricky, due to timing issues with the successive clicks. It's best to stick with Left click, Right click, Middle click, or key combos like Shift + Left-Button, etc.
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh
In Section
Seekers of Perl Wisdom
|
|