in reply to Re^2: Using Ctrl A and del in the Entry widget in perl tk
in thread 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( -bg => 'white', -selectbackground => 'hotpink', ) -> pack(); $ent->focus; $ent->bind('<Control-a>', \&select_it ); MainLoop; sub select_it{ $ent->selectionRange(0,'end'); }
|
|---|