Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tkinter focus
#5
the solution i have now is very limited to my program, I simply bind every widgets with '<Return>' as:
def refresh(event):
    '''
    function here
    '''

widget1.bind('<Return>',refresh)
widget2.bind('<Return>',refresh)
#......
window.mainloop()
so that after i input the value i need to press entre to run the function i need.
Reply


Messages In This Thread
Tkinter focus - by catlessness - Mar-08-2020, 05:24 PM
RE: Tkinter focus - by Larz60+ - Mar-08-2020, 07:14 PM
RE: Tkinter focus - by catlessness - Mar-09-2020, 02:12 PM
RE: Tkinter focus - by Larz60+ - Mar-09-2020, 07:23 PM
RE: Tkinter focus - by catlessness - Apr-02-2020, 07:14 PM
RE: Tkinter focus - by joe_momma - Apr-03-2020, 05:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,902 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  How to move in entries using the arrow keys by applying the bind and focus? pymn 4 4,711 Apr-06-2022, 04:29 AM
Last Post: pymn
  How to disable focus on Frame in Tkinter? szafranji 1 3,019 May-13-2020, 10:45 PM
Last Post: DT2000
  QComboBox doesn't display selection as long as it has not lost the focus Meaulnes 3 3,237 May-07-2020, 03:42 PM
Last Post: Meaulnes
  [Tkinter] Resetting scale value back to 0 after the slider loses focus lwhistler 3 6,948 Mar-07-2017, 10:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020