|< 1 2 >| | 14 Einträge, 2 Seiten |
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
...
#zeile1
if ( $ref_hash_konfig->{pfeil_zurueck} == '1'){
$frame_kontakte_haupt->Button(-text => '<<', -command => [\&eintrag_zurueck],)->grid(-row=>'0', -column=>'0', -sticky => 'w');
}
if ( $ref_hash_konfig->{nachname} == '1'){
$frame_kontakte_haupt->Label(-text => "Nachname:")->grid(-row=>'0', -column=>'1', -sticky => 'w');
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_hash_haupt->{nachname}, -state => '$ref_hash_berechtigung->{nachname}')->grid(-row=>'0', -column=>'2', -sticky => 'w');
}
else{
$spacer1 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer1.png');
$frame_kontakte_haupt->Label(-image => $spacer1, -width => "200", -height => "10")->grid(-row=>'0', -column=>'1', -columnspan => '2', -sticky => 'w');
}
if ( $ref_hash_konfig->{vorname} == '1'){
$frame_kontakte_haupt->Label(-text => "Vornamen:")->grid(-row=>'0', -column=>'3', -sticky => 'w');
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_hash_haupt->{vorname})->grid(-row=>'0', -column=>'4', -sticky => 'w');
}
else{
$spacer2 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer2.png');
$frame_kontakte_haupt->Label(-image => $spacer2, -width => "242", -height => "10")->grid(-row=>'0', -column=>'3', -columnspan => '2', -sticky => 'w');
}
if ( $ref_hash_konfig->{pfeil_vor} == '1'){
$frame_kontakte_haupt->Button(-text => '>>', -command => [\&eintrag_vor])->grid(-row=>'0', -column=>'5', -sticky => 'w');
}
if ( $ref_hash_konfig->{zimmer_bett} == '1'){
$frame_kontakte_haupt->Label(-text => "Zimmer / Bett:")->grid(-row=>'0', -column=>'6', -sticky => 'w');
$frame_kontakte_haupt->BrowseEntry( -variable => \$ref_hash_haupt->{zimmerbett})->grid(-row=>'0', -column=>'7', -sticky => 'w');
}
else{
$spacer3 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer3.png');
$frame_kontakte_haupt->Label(-image => $spacer3, -width => "232", -height => "10")->grid(-row=>'0', -column=>'6', -columnspan => '2', -sticky => 'w');
}
...
#zeile2
if ( $ref_hash_konfig->{anrede} == '1'){
$frame_kontakte_haupt->Label(-text => "Anrede:")->grid(-row=>'1', -column=>'1', -sticky => 'w');
$frame_kontakte_haupt->BrowseEntry(-variable => \$ref_hash_haupt->{anrede}, -colorstate => 'white',)->grid(-row=>'1', -column=>'2', -sticky => 'w');
}
else{
$spacer1 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer1.png');
$frame_kontakte_haupt->Label(-image => $spacer1, -width => "200", -height => "10")->grid(-row=>'1', -column=>'1', -columnspan => '2', -sticky => 'w');
}
...
#zeile3
if ( $ref_hash_konfig->{geburtstag} == '1'){
$frame_kontakte_haupt->Label(-text => "Geburtstag:")->grid(-row=>'2', -column=>'1', -sticky => 'w');
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_hash_haupt->{geburtstag})->grid(-row=>'2', -column=>'2', -sticky => 'w');
}
else{
$spacer1 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer1.png');
$frame_kontakte_haupt->Label(-image => $spacer1, -width => "200", -height => "10")->grid(-row=>'2', -column=>'1', -columnspan => '2', -sticky => 'w');
}
...
#zeile4
...
1
2
3
4
5
6
7
8
if ( $ref_hash_konfig->{nachname} == '1'){
$frame_kontakte_haupt->Label(-text => "Nachname:")->grid(-row=>'0', -column=>'1', -sticky => 'w');
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_hash_haupt->{nachname}, -state => '$ref_hash_berechtigung->{nachname}')->grid(-row=>'0', -column=>'2', -sticky => 'w');
}
else{
$spacer1 = $frame_kontakte_haupt->Photo('-format' => 'png', -file => 'images/spacer1.png');
$frame_kontakte_haupt->Label(-image => $spacer1, -width => "200", -height => "10")->grid(-row=>'0', -col vonumn=>'1', -columnspan => '2', -sticky => 'w');
}
QuoteTk::Error: Odd number of args to Tk::Label->new(...)
Tk callback for event
Tk callback for .
Tk callback for .frame
Tk::Widget::new at C:/Perl/site/lib/Tk/Widget.pm line 164
Tk::Widget::__ANON__ at C:/Perl/site/lib/Tk/Widget.pm line 256
main::kontakte_haupt_widget at D:\Daten\Arbeit\Programmieren\Perl-Scripte\Plave
do TK\Redesign 1_9\test_fuer_sub.pl line 62
Odd number of args to Tk::Label->new(...)
at D:\Daten\Arbeit\Programmieren\Perl-Scripte\Plavedo TK\Redesign 1_9\test_fuer
_sub.pl line 62
....($parmeter => $uebrgabe_wert)...
1
2
3
4
5
6
7
8
9
$frame_kontakte_haupt = $hauptfenster->Frame(-borderwidth => "2")->pack();
my $hash;
$hash->{parameter} = "-text => 'klar'";
&kontakte_haupt_widget($frame_kontakte_haupt, 'Label', \%{$hash});
MainLoop;
sub kontakte_haupt_widget{
my ( $frame, $widget, $hash,) = @_;
$frame->$widget( $hash->{paramter} )->grid();
}
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
29
30
31
32
33
34
35
sub set_label {
my ( $frame, $use_name, $label, $entry ) = @_;
if ($use_name) {
$frame->Label(%$label)
->grid( -row => '0', -column => '1', -sticky => 'w' );
$frame->Entry(%$entry)
->grid( -row => '0', -column => '2', -sticky => 'w' );
}
else {
my $spacer1 =
$frame->Photo( '-format' => 'png', -file => 'images/spacer1.png' );
$frame->Label( -image => $spacer1, -width => "200", -height => "10" )
->grid(
-row => '0',
-column => '1',
-columnspan => '2',
-sticky => 'w'
);
}
}
my $use_name = $ref_hash_konfig->{nachname} == '1';
set_label(
$frame_kontakte_haupt,
$use_name,
$use_name
? (
{ -text => "Nachname:" },
{
-textvariable => \$ref_hash_haupt->{nachname},
-state => '$ref_hash_berechtigung->{nachname}'
}
)
: ()
);
1
2
3
4
5
6
7
8
9
10
11
12
13
set_label(
$frame_kontakte_haupt,
$use_name,
$use_name
? (
{ -text => "Nachname:" },
{
-textvariable => \$ref_hash_haupt->{nachname},
-state => '$ref_hash_berechtigung->{nachname}'
}
)
: ()
);
|< 1 2 >| | 14 Einträge, 2 Seiten |