in reply to Using Ctrl A and del in the Entry widget in perl tk
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = new MainWindow; my $ent = $mw -> Entry() -> pack(); $ent->focus; $ent->bind('<Control-a>', \&clear ); $ent->bind('<Delete>', \&clear ); MainLoop; sub clear { $ent->delete(0,'end'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Ctrl A and del in the Entry widget in perl tk
by choroba (Cardinal) on Oct 21, 2011 at 11:33 UTC | |
by zentara (Cardinal) on Oct 21, 2011 at 11:42 UTC |