The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

kkaz (1) [Avatar] Offline

I do not know too much about Python and I just need to modify a single script.
I have a bunch of tk windows. I know their IDs.
Now, I want to use focus() method for some of them, i.e. run w.focus()
My question is - how to find (get, select...) window w knowing its ID?

Thanks in advance,
woooee (10) [Avatar] Offline
Re: how to select window knowing its ID?
w.focus_set() is possibly what you want to use You should define "window" specifically, i.e. is it a Toplevel, Frame, Entry, etc.

Message was edited by: