use strict; use warnings; package ServusWelt; use Wx qw/ wxGROW wxALL wxVERTICAL /; use base qw(Wx::App); # von Wx::App ableiten sub OnInit { my $app = shift; my $frame = Wx::Frame->new( undef, # kein Eltern-Fenster -1, # Fenter id 'Servus Welt', # Titel [-1, -1], # Position x/y [150, 150] # Größe x/y ); $app->SetTopWindow($frame); # Fenster als oberstes bestimmen my $panel = Wx::Panel->new( $frame, -1); my $nsz = Wx::BoxSizer->new(wxVERTICAL); my $staticbox = Wx::StaticBox->new( $panel, -1, 'Wx::StaticBox' ); my $button = Wx::Button->new( $panel, -1, 'Button 3' ); $nsz->Add( $staticbox, 1, wxGROW|wxALL, 5 ); #$nsz->Add( $button, 1, wxGROW|wxALL, 5 ); $frame->Show(1); # Fenster zeichnen } # /OnInit package main; ServusWelt->new->MainLoop; # Programminstanz erzeugen und starten