Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window refuses focus

Status
Not open for further replies.

fdservices

IS-IT--Management
Mar 10, 2005
52
FR
I have a main window which generates a second window on to of the first. I would like to make it so that the main window refuses to take the focus, an that if the main window is clicked then the second window automatically takes the focus, if that makes sense. Grab does not make the first window refuse the focus, and I have tried bindings without any success.

Can someone suggest how I can make this happen.

All the best

Andrew
 
What binding have you tried? That seems to me to be the way to go:
Code:
toplevel .tl1
bind . <Button-1> {focus .tl1}

_________________
Bob Rashkin
 
I actually tried FocusIn, but I will give the Button-1 a try and see i I get a result.

Thanks for the reply

Andrew
 
What I have done is removed the grab that I set up and replace it with:

bind . <FocusIn> {focus .tl1}

and it seems to work. Only time will tell!

Thnaks for steering me in the right direction with the <Button-1>, I realised that the grab was operating before the bind had a chance.

All the best

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top