3 Einträge, 1 Seite |
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my($cur_time, $stat_msg);
my $mw = tkinit;
$mw->geometry("200x100");
my $statusbar = $mw->Frame()->pack(-side => 'bottom',
-fill => 'x');
$statusbar->Label(-textvariable => \$stat_msg,
-relief => 'sunken')->pack(-side => 'left',
-fill => 'x',
-expand => 1);
$statusbar->Label(-textvariable => \$cur_time,
-relief => 'sunken')->pack(-side => 'left');
$mw->repeat(100 => sub { $cur_time = sprintf("%02d:%02d:%02d", (localtime)[2,1,0] ) });
$mw->bind('<Motion>' => [sub { $stat_msg = "$_[1]:$_[2]" }, Ev('x'), Ev('y') ]);
MainLoop;
3 Einträge, 1 Seite |