|Don't ask to ask, just ask|
Adding items to default Text widget
by cmv (Chaplain)
|on Jan 20, 2011 at 17:55 UTC||Need Help??|
cmv has asked for the
wisdom of the Perl Monks concerning the following question:
I want to add (maybe delete) some items from the default menu that comes up when you click <button-3> in a ptk Text window. How can I do this?
The attached code can be used to bring up this default menu. Run the code and right-click-and-hold in the empty text window. You should see a menu containing File, Edit, Search, View.
You'll notice that I'm trying to use bindtags to figure out how this is bound to the text widget by default, but I don't understand the output.
This seems like a very general question that an FAQ should have, but I've failed to find any useful information with my google searches. I got this code from Mastering Perl/Tk (The bindtags Command), but it doesn't seem to be leading in the right direction. Please point me to anything helpful.
Update: Changed references from <button-2> to <button-3>