vinothjaguva has asked for the wisdom of the Perl Monks concerning the following question:
Hi
How to Destroy the childs in wxperl->Wx window.
I have menu with few names test1, test2, test3, test4. If i select test1, in the parent widow i have to create a button with the text download and upload. If i select test2, in the parent window i have to create button with the text start stop. Using the below i can able to create, but if i select test2, the test1 information is also there in the window. I want to remove/destroy the test1 screen information.
use base 'Wx::Panel'; use Wx qw(:sizer :misc :id); use Wx::Event qw(EVT_BUTTON); sub new { my $ref = shift; my $parent = shift; my $self = $ref->SUPER::new($parent, wxID_ANY, wxDefaultPosition, w +xDefaultSize); $self->{sizer} = Wx::StaticBoxSizer->new( Wx::StaticBox->new($s +elf, -1, 'Box label'), wxHORIZONTAL); $self->{button} = Wx::Button->new($self, -1, 'Button'); $self->{sizer}->Add($self->{button}, 1, wxEXPAND | wxALL, 10); EVT_BUTTON($self, $self->{button}, \&click); $self->SetSizerAndFit($self->{sizer}); return $self; } sub click { Wx::MessageBox('Click!'); }
Thanks in Advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Wxperl child window destroy
by Anonymous Monk on Sep 14, 2011 at 07:49 UTC | |
|
Re: Wxperl child window destroy
by Anonymous Monk on Sep 14, 2011 at 12:08 UTC | |
by Anonymous Monk on Jun 20, 2012 at 09:48 UTC | |
by Anonymous Monk on Jun 20, 2012 at 10:26 UTC | |
by Anonymous Monk on Jun 20, 2012 at 11:44 UTC | |
by Anonymous Monk on Jun 20, 2012 at 11:58 UTC |