my $fenster = Gtk2::Window->new();
my $scroll = Gtk2::ScrolledWindow->new();
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
#!/usr/bin/perl use strict; use warnings; use Gtk2 '-init'; my $w_top = Gtk2::Window->new; $w_top->signal_connect(destroy=> \&quit); $w_top->set_default_size (150, 100); my $vbox = Gtk2::VBox->new(0,0); $w_top->add($vbox); my $w_swin=Gtk2::ScrolledWindow->new(); $w_swin->add_with_viewport(Gtk2::Label->new("Nur ein Test! "x10)); # pack_start(<Widget>, <expand>, <fill>, <padding>); $vbox->pack_start($w_swin, 1,1,0); my $quit = Gtk2::Button->new("Quit"); $quit->signal_connect(clicked=> \&quit); $vbox->pack_start($quit, 0, 0, 0); $w_top->show_all(); Gtk2->main(); sub quit { Gtk2->main_quit(); exit(); }