mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)
This commit is contained in:
parent
b43c7e1070
commit
194fd17bc6
4 changed files with 59 additions and 0 deletions
|
@ -897,6 +897,21 @@ class Misc:
|
|||
pass
|
||||
self.tk.call('after', 'cancel', id)
|
||||
|
||||
def after_info(self, id=None):
|
||||
"""Return information about existing event handlers.
|
||||
|
||||
With no argument, return a tuple of the identifiers for all existing
|
||||
event handlers created by the after and after_idle commands for this
|
||||
interpreter. If id is supplied, it specifies an existing handler; id
|
||||
must have been the return value from some previous call to after or
|
||||
after_idle and it must not have triggered yet or been canceled. If the
|
||||
id doesn't exist, a TclError is raised. Otherwise, the return value is
|
||||
a tuple containing (script, type) where script is a reference to the
|
||||
function to be called by the event handler and type is either 'idle'
|
||||
or 'timer' to indicate what kind of event handler it is.
|
||||
"""
|
||||
return self.tk.splitlist(self.tk.call('after', 'info', id))
|
||||
|
||||
def bell(self, displayof=0):
|
||||
"""Ring a display's bell."""
|
||||
self.tk.call(('bell',) + self._displayof(displayof))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue