in an object-oriented tkinter application (i.e., one in which we implemented the user interface as a class), why did we use bound methods when we set up our event handlers?suppose that bound methods didn't exist in python, so that we couldn't have solved the problem that way. using only techniques that have been taught in this course to date, suggest

Respuesta :

The mainloop method is used to enter an event loop into which a Tkinter application runs all of its time. It sitting tight to for occasions to occur. The user's actions can be referred to as events.

The programmer has a way to deal with events thanks to Tkinter. For each widget, Python functions and methods can be bound to an event.

widget.bind(event,handler): If the defined event occurs in the widget, the "handler" function is called with an event object that describes the event.

For eg

#! # /user/bin/python3 import * def hello(event) print("single click,Button-1") def quit(event); this will make tkinter compatible with Python 2.x.

import sys; sys.exit() widget = Button(None, text='Mouse Clicks') widget.pack() widget.bind('Button-1>',hello) widget.bind('Double-1>',quit) widget.mainloop()  

print("Double click,so let's stop"). Tkinter allows the user to specify which events, both of which are referred to as "event sequences," and this is the primary contention "event" of the tight spot technique. The event sequence is provided as a string using the syntax that comes after it:

Modifier-Type-Detail> The most crucial component of an event specifier is the type field. However, the "modifier" and "detail" fields are optional and frequently skipped over. They provide additional data for the chosen "type." The event type describes the kind of event that will be bound, such as when the widget, mouse clicks, or other actions received the focus of the input.

To know more about Tkinter application visit

brainly.com/question/17438804

#SPJ4