Leser: 2
|< 1 2 3 4 >| | 31 Einträge, 4 Seiten |
my $entry = $mainwindow->Entry(-textvariable => $Maus1)->pack();
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
sub hlist_notebook{
my ( $hash_ref, $hash_ref_ini, $page, $hlist, $befehl, $choices) = @_;
my ( $counter, $choices_for_browse, $choices_befehl, $feld, $feldname);
for $feldname (keys(%{$hash_ref_ini})) {
$counter++;
}
my $choices_spalte = lies_tabellen_zeilen($dbh, "adresstyp", "beschreibung");
$hlist = $page->Scrolled("HList",
-header => 1,
-columns => $counter,
-scrollbars => 'oe',
-width => 145,
-height => 20,
-relief => 'flat',
)
->$befehl();
for my $datensatz_id (sort keys(%{$hash_ref})){
my $e = $hlist->addchild("");
for $feldname (keys(%{$hash_ref_ini})) {
my $browse = $hash_ref_ini->{$feldname}->{'widget'};
$hlist->header('create',
$hash_ref_ini->{$feldname}->{'place'},
-itemtype => 'window',
-widget => $hlist->Button(-text => $hash_ref_ini->{$feldname}->{'buttonname'},
-relief => 'flat',
-command => [ \&MyTk::HList::order, $hash_ref_ini->{$feldname}->{'place'}, $hash_ref_ini->{$feldname}->{'numorder'} , $hlist, $feldname, \%{$hash_ref}, \@{$choices_spalte}, \%{$hash_ref_ini} ]),
-style => $headerstyle);
$hlist->itemCreate($e,
$hash_ref_ini->{$feldname}->{'place'},
-itemtype => 'window',
(-widget => $feld = $hlist->$browse($hash_ref_ini->{$feldname}->{'variable'} => \$hash_ref->{$datensatz_id}->{$feldname},
-width => $hash_ref_ini->{$feldname}->{'width'})));
if ($browse eq "BrowseEntry"){
my $counter;
foreach my $zeile(@{$choices_spalte}){
$counter++;
foreach (@{$zeile}){
$feld->insert($counter,$_)
}
};
}
elsif ( $browse eq "Checkbutton"){
$feld->configure(-command => [\&auswahl_checkbutton,\%{$hash_ref}, $datensatz_id, \%{$hash_ref_ini} ]);
}
}
}
return ($hlist);
}#hlist_notebook
1
2
3
4
5
6
7
8
sub loeschen_Hlist{
my ($hlist ) = @_;
my ($entrypath, $show, $inhalt);
$entrypath = $hlist->selectionGet;
$show = $hlist->itemCget($entrypath, 1, 'widget');
$hlist->delete('entry', $entrypath);
}
|< 1 2 3 4 >| | 31 Einträge, 4 Seiten |