Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: prevent auto-focus in Tk Toplevels

by Rich36 (Chaplain)
on Dec 23, 2002 at 18:08 UTC ( #221918=note: print w/replies, xml ) Need Help??


in reply to prevent auto-focus in Tk Toplevels

You could try passing the parent widget to the routine that creates the new Toplevel and then call $parentwidget->focus to give the parent widget focus. You could bind this method to when your new window takes focus.

In Mastering Perl/Tk, there's also the method $widget->focusForce, which allows you to "force a widget to have the focus even if the applicatuion isn't currently active" (p. 299, Mastering Perl/Tk).


«Rich36»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://221918]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2021-04-13 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?