#!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit; my $tt = $mw->Scrolled('Text')->pack; $tt->bind( '<Key>' => sub { warn $Tk::event->k, ' ', $Tk::event->K; } +, ); $tt->bind( 'Tk::Text' => '<Key-semicolon>' => 'NoOp' ); $tt = $mw->Scrolled('Text')->pack; $tt->bind( 'Tk::Text' => '<Key-semicolon>' => sub { warn 'semicolon re +jected '; return !!0; } ); $mw->WidgetDump; use Tk::WidgetDump; $tt->focus; $mw->MainLoop;
In reply to Re^3: How to validate text in Text widge ( Tk::NoOp )
by Anonymous Monk
in thread How to validate text in Text widge
by Kafka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |