in reply to Re: How do I suppress handlers when binding callbacks in Tk
in thread How do I suppress handlers when binding callbacks in Tk
Thanks for that. The modification to my sample code to do what I wanted is:
use strict; use warnings; use Tk; my $mw = MainWindow->new; my $text = $mw->Text ()->pack (-expand => 'yes', -fill => 'both'); $text->bindtags ([$text, ref($text), $text->toplevel, 'all']); $text->bind ('<Control i>', \&callback); MainLoop; sub callback { print "got a Control i\n"; Tk->break; }
|
|---|