brian42miller has asked for the wisdom of the Perl Monks concerning the following question:
If I have a text widget ....
my $text = $frame->Scrolled('Text',-state => 'disabled');
and I try to bind a key event to it
$text->Subwidget("text")->bind( '<Any-Key>' => sub { print "HELLO\n"; });
the key event does not seem to get recognized if the -state is 'disabled'. When I set the -state to 'normal' the event does get recognized.
I am using the text widget as a transcript window so I don't want it 'normal'.
Is there a anyway to catch a key event over a disabled text widget?
Thanks Brian
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Text widget & key bindings
by lamprecht (Friar) on Apr 20, 2011 at 20:34 UTC | |
by brian42miller (Sexton) on Apr 21, 2011 at 19:09 UTC |