focus - Manage the input focus
http://purl.org/tcl/home/man/tcl8.5/TkCmd/focus.htm
focus
focus window
focus -displayof window
focus -force window
focus -lastfor window
When is it important to use focus?
To change the order in which focus moves between widgets upon the pressing of 'Tab', either:
RS 2006-05-24: focus -force $toplevel on Windows has the effect of flashing the app's button in the task bar.
MG has found this behaviour to be very erratic. Usually focus (and focus -force) transfer the focus, but occasionally they'll only flash the taskbar button for the app. (wm deiconify does the reverse, usually flashing the taskbar but sometimes giving the app focus instead.) An external lib for flashing the taskbar is far more reliable, from my experience.