in reply to Cursor keys with Tk::Hlist goes wrong
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; my $hl = $mw->HList(-itemtype=>'text')->pack; for my $n (0..5){ $hl->add($n , -text=>"Item $n", ); } $mw->bind('<Key-F1>',sub{$hl->selectionClear; $hl->anchorClear; $hl->selectionSet(0); $hl->anchorSet(0); } ); MainLoop; # by Christoph
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cursor keys with Tk::Hlist goes wrong
by luke67m (Initiate) on Aug 29, 2014 at 17:10 UTC | |
by luke67m (Initiate) on Aug 30, 2014 at 19:40 UTC |