Hi,
Thanks to everyone for their help.
Here is an answer that works:
$self->{"Notebook_tab_1"}->DestroyChildren();
$self->{"Notebook"}->RemovePage(0);
Regards
Steve
-----Original Message-----
From: Steve Cookson [mailto:[email protected]]
Sent: 07 August 2009 14:31
To: [email protected]
Cc: 'Andri Möll'
Subject: RE: Destructors
Hi Andri,
Thanks for this.
So my frame is called $self, and I have a TextCtrl on it
called $self->{"Field_Txt"}.
I tried to do:
DESTROY($self->{"Field_Txt"});
.
.
.
.
.
sub DESTROY{
}
but it doesn't work.
Maybe because I am only trying to delete part of an object, I should use a
different command.
Regards
Steve
-----Original Message-----
From: Andri Möll [mailto:[email protected]]
Sent: 07 August 2009 13:53
To: Steve Cookson
Cc: wxperl-users
Subject: Re: Destructors
On Fri, 2009-08-07 at 13:23 -0300, Steve Cookson wrote:
> Hi Guys,
>
> Does anyone know what the correct syntax for a Perl destructor is, if
> I want to remove a field, sizer or tab from a pane?
>
> Any suggestions welcome!
>
> Regards
>
> Steve
Use the DESTROY subroutine with your Perl blessed object and invoke the
appropriate method on your panel/sizer. wxSizer has Detach, wxWindow
has Destroy and so on.
Both the online WxWidgets' manual page at
http://docs.wxwidgets.org/trunk/index.html and the perlobj(1) manual
page might help you.
Andri