GrandFather has asked for the wisdom of the Perl Monks concerning the following question:
I wish to alter the behaviour of certain keys for a Text widget. I can add my new handling by binding a callback, but I can't find out how to suppress the original handling for the key.
For example, I'd like to alter the following code so that Control i doesn't insert a tab into the Text widget:
use strict; use warnings; use Tk; my $mw = MainWindow->new; my $text = $mw->Text ()->pack (-expand => 'yes', -fill => 'both'); $text->bind ('<Control i>', \&callback); MainLoop; sub callback { print "got a Control i\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I suppress handlers when binding callbacks in Tk
by BrowserUk (Patriarch) on Apr 23, 2006 at 22:36 UTC | |
by GrandFather (Saint) on Apr 23, 2006 at 22:48 UTC |