You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
22.8 Virtual eventsYou can create your own new kinds of events called virtual events. You can give themany name you want so long as it is enclosed in double pairs of .For example, suppose you want to create a new event called , that is triggeredeither by mouse button 3 or by the PAUSE key. To create this event, call this method onany widget w:w.event_add ( "", "","" )You can then use "" in any event sequence. For example, if you use this callw.bind ( "", h )any mouse button 3 or PAUSE keypress in widget w will trigger the handler h.See .event_add(), .event_delete(), and .event_info() under Universal widgetmethods, above, <strong>for</strong> more in<strong>for</strong>mation about creating and managing virtual events.Written by John W. Shipman (tcc-doc@nmt.edu). This version printed 2003-09-12. Copyright c○ 2001 by the NewMexico Institute of Mining and Technology.New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: Events Page 84