Thread Entry ins Hashfeld (5 answers)
Opened by Kristop8 at 2005-12-17 23:14

renee
 2005-12-18 05:33
#45104 #45104
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Das hier sollte funktionieren:
Code: (dl )
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);
}
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Entry ins Hashfeld