Leser: 1
2 Einträge, 1 Seite |
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
#!/usr/bin/perl use warnings; use strict; use Glib qw(TRUE FALSE); use Gtk2 -init; use Gtk2::GladeXML; use Gtk2::SimpleList; use Glib; my $g = Gtk2::GladeXML->new('wiceshaped.glade'); my $vbox = $g->get_widget('vbox1'); my $slist = Gtk2::SimpleList->new('colname', 'text'); $slist->get_selection->set_mode('multiple'); push @{$slist->{data}}, [ 'text1']; push @{$slist->{data}}, [ 'text2']; $vbox->add($slist); $slist->show(); Gtk2->main();
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
#!/usr/bin/perl use warnings; use strict; use Glib qw(TRUE FALSE); use Gtk2 -init; use Gtk2::GladeXML; use Gtk2::SimpleList; use Glib; my $g = Gtk2::GladeXML->new('wiceshaped.glade'); my $vbox = $g->get_widget('vbox1'); my $main_window = $g->get_widget('window1'); my $slist = Gtk2::SimpleList->new('colname', 'text'); $slist->get_selection->set_mode('multiple'); push @{$slist->{data}}, [ 'text1']; push @{$slist->{data}}, [ 'text2']; push @{$slist->{data}}, [ 'text3']; push @{$slist->{data}}, [ 'text4']; push @{$slist->{data}}, [ 'text5']; push @{$slist->{data}}, [ 'text6']; push @{$slist->{data}}, [ 'text7']; push @{$slist->{data}}, [ 'text8']; push @{$slist->{data}}, [ 'text9']; push @{$slist->{data}}, [ 'text10']; my $scrwin = Gtk2::ScrolledWindow->new(); $scrwin->set_policy('automatic', 'automatic'); $scrwin->add_with_viewport($slist); $vbox->add($scrwin); $main_window->show_all(); Gtk2->main();
2 Einträge, 1 Seite |