Leser: 1
7 Einträge, 1 Seite |
-browsecmd=>\&testsub
sub testsub {print "@_\n"}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::HList;
my $mw = tkinit();
my $hlist = $mw->HList()->pack();
$hlist->bind('<Button-1>',\&do_event);
$hlist->bind('<Down>',\&do_event);
$hlist->bind('<Up>',\&do_event);
fill_list();
MainLoop;
sub fill_list{
for(0..1){
$hlist->add($_,-itemtype => 'text',-text => $_);
}
}
sub do_event{
print $_,"\n" for $hlist->selectionGet();
}
sub testsub{
print "@_\n";
}
7 Einträge, 1 Seite |