spx2 has asked for the wisdom of the Perl Monks concerning the following question:
In $poe_main_window I create a $button. Also in that button I have a key binding on the key c that does $button->invoke. That button , opens a new window with $poe_main_window->TopLevel; and in that window there is a text widget. Only problem is,that when one writes stuff in that window and "accidentally" types the key c it triggers the binding that was binded for $poe_main_window altough that binding was mean for the $poe_main_window *ONLY*.
$poe_main_window->bind('all','<c>', sub{ $button->invoke; } )
I'm currently reading some book on Tk to see if I can fix the problem.I'd be interested in your thoughts also on solving the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: a binding handles keys pressed in unwanted windows
by liverpole (Monsignor) on Sep 21, 2007 at 14:25 UTC |