8 Einträge, 1 Seite |
my $Hallo = $frame ->Button(-text=> 'Klick mich!', -command=> sub { print $nw; })->pack();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = tkinit();
my $button = $mw->Button(-text => 'open a file', -command => \&open_file)->pack();
MainLoop;
sub open_file{
my $file = $mw->getOpenFile();
print $file if(defined $file);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = tkinit();
my $button = $mw->Button(-text => 'open a file', -command => \&open_file)->pack();
MainLoop;
sub open_file{
my $file = $mw->getOpenFile();
print $file if(defined $file);
}
my $ddd = MainWindow->new();
8 Einträge, 1 Seite |