Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 9 - GUI Programming using Tkinter - Section 9.11 - Mouse, Key Events, and Bindings - Check Point - MyProgrammingLab - Page 297: 9.33

Answer

The event for clicking the middle mouse button three times is "Triple-Button-2".

Work Step by Step

Here's an example of how you can bind an event to a canvas when the middle mouse button is clicked three times: from tkinter import * def processTripleClick(event): $\hspace{4mm}$print("Triple-Button-2 event detected") root = Tk() canvas = Canvas(root, width=200, height=200) canvas.pack() canvas.bind("", processTripleClick) root.mainloop() In this example, when the middle mouse button is clicked three times on the canvas, the function processTripleClick will be called and the message "Triple-Button-2 event detected" will be printed to the console.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.