6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...
$frame=$mw->Frame(-bg=>'white')->pack(-side=>'left');
foreach (qw/ Vorname: Nachname: Telefon: Email: /) {
$frame->Label(-text=>$_)->pack();
$frame->Entry(-textvariable=> \$results_1{$_})->pack();}
foreach (qw/ Vorname: Nachname: Telefon: Email: /) {
$frame->Label(-text=>$_)->pack();
$frame->Entry(-textvariable=> \$results_2{$_})->pack();}
....
$frame->Button(-text=> 'Save and Exit', -command =>sub {weiter} )->pack(-side=>'bottom')
sub weiter()
{ ??? }
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 Data::Dumper;
use Tk;
my (%result_1,%result_2);
my $mw = tkinit;
my $frame=$mw->Frame(-bg=>'white')->pack(-side=>'left');
foreach (qw/ Vorname: Nachname: Telefon: Email: /) {
$frame->Label(-text=>$_)->pack();
$frame->Entry(-textvariable=> \$result_1{$_})->pack();
}
foreach (qw/ Vorname: Nachname: Telefon: Email: /) {
$frame->Label(-text=>$_)->pack();
$frame->Entry(-textvariable=> \$result_2{$_})->pack();
}
$frame->Button(-text=> 'Save and Exit', -command =>sub {weiter()})
->pack(-side=>'bottom')
MainLoop;
sub weiter{
print Dumper(\%result_1),"\n",Dumper(\%result_2);
}
6 Einträge, 1 Seite |