#!c:/perl/bin/perl use strict; use warnings; package MyApp; use strict; use warnings; use base 'Wx::App'; sub OnInit { my $frame = MyFrame->new; $frame->Show(1); return 1; } package MyFrame; use Wx qw(:everything); use base 'Wx::Frame'; use wxHtmlWindow; ############ the culprit sub new { my ($class) = @_; my $self = $class->SUPER::new( undef, -1, 'TextEntryDialog.pl', wxDefaultPosition, wxDefaultSize, ); my $statusBar = Wx::StatusBar->new($self, wxID_ANY, wxST_SIZEGRIP); $self->SetStatusBar($statusBar); my @widths = (250, 100, -1); $statusBar->SetFieldsCount($#widths+1); $statusBar->SetStatusWidths(@widths); $statusBar->SetStatusText("Ready", 0); myStdDialogs($self); return $self; } sub myStdDialogs { my ( $self ) = @_; my $getTextFromUser = Wx::GetTextFromUser( "This is some text, actually a lot of text\nEven two rows of text", "Enter a String: ", wxOK | wxCANCEL, $self); # Wx::MessageBox("$getTextFromUser", "Entered String", wxOK | wxICON_INFORMATION, $self); } # package main; # # MyApp->new->MainLoop; or my $app = MyApp->new; $app->MainLoop;