sub add_alert { my ($self, $event) = @_; #~ my $md = MyDialog->new(my $frame_1); #~ $md->ShowModal(); my $dialog = Wx::TextEntryDialog->new( $self, "Enter some text", "Wx::TextEntryDialog sample", 9, # "I am a default value" ); if ( $dialog->ShowModal == Wx::wxID_OK() ) { unshift @numbers, $dialog->GetValue; $self->{text_ctrl_1}->SetLabel("The button @numbers"); } $dialog->Destroy; }