Leser: 1
6 Einträge, 1 Seite |
$liste->clear();
$liste->delete(0,'end');
$indexlist->insert("end", sort keys %h);
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
#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Listbox; my $mw = tkinit; my %h = ( 0 => { X1 => 'value1', Y1 => 'value2', X2 => 'value3', Y2 => 'value4', }, 1 => { X1 => 'value5', Y1 => 'value6', X2 => 'value7', Y2 => 'value8', }, ); my $i_liste = $mw->Listbox->pack(-side => 'left', -anchor => 'w'); my $k_liste = $mw->Listbox->pack(-side => 'left', -anchor => 'w'); my $v_liste = $mw->Listbox->pack(-side => 'left', -anchor => 'w'); for my $key ( sort keys %h ){ for my $key2 ( sort keys %{ $h{$key} } ){ $i_liste->insert('end',$key); $k_liste->insert('end',$key2); $v_liste->insert('end',$h{$key}->{$key2}); } } MainLoop;
6 Einträge, 1 Seite |