Leser: 21
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use strict; use Tk; $|++; my $mw = MainWindow->new(-title=>'Tk Test'); $mw->configure(-width=>400, -height=>100); sleep(1); $mw->configure(-width=>800, -height=>100); MainLoop;
$mw->update;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use Tk;
my $height = 100;
my $width = 400;
my $mw = MainWindow->new(-title=>'Tk Test');
$mw->configure(-width=>$width, -height=>$height);
$mw->repeat(50, sub{
$width += 5;
$height += 5;
$mw->configure(-width=>$width, -height=>$height);
});
MainLoop;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new(-title=>'Tk Test'); for (my $w=0;$w<=800;$w=$w+8) { $mw->configure(-width=>$w, -height=>$w/4); $mw->update; #$mw->DoOneEvent; #$mw->idletasks; } MainLoop;