jlnelson19 has asked for the wisdom of the Perl Monks concerning the following question:
The above works fine, but it applies to the entire tree, no matter where you click. What if I add elements like so:$tree->bind('<3>', sub{print "right click"});
How can I bind events to the individual branches of the tree, so that if a user right-clicks on just the "TEST 2" branch, I can handle it separately?$tree->add("test1", -text => "TEST 1"); $tree->add("test2", -text => "TEST 2"); $tree->add("test3", -text => "TEST 3");
I assume the same would apply to any list as well. Is there a way to bind events to individual list elements?
|
|---|