Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Tkinter how do i remove focus from a widget?

Tags:

python

tkinter

I'd like to remove focus from a widget manually.

like image 311
rectangletangle Avatar asked Nov 28 '10 22:11

rectangletangle


2 Answers

My solution is root.focus() it will remove widget focus.

like image 61
Long Tran Avatar answered Oct 02 '22 02:10

Long Tran


So the question may be a duplicate here, but the answer from @Bryan Oakley works perfectly for me in Python 3.8

root.focus_set()

Too easy...

like image 35
nimig18 Avatar answered Oct 02 '22 01:10

nimig18