Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
tkinter execute function on enter 1

tkinter execute function on enter

June 24, 2022 by Anurag batra
def func(event):
    print("You hit return.")
    
root.bind('', func)

Here is what the above code is Doing:
1. We create a function called func.
2. We bind the function to the event .
3. When the user hits the return key, the function func is called.

Categories Python Examples
Post navigation
how to get all the keys of a dictionary in python
instal cython
© MyEduKit - 2022 . All Rights Reserved.