Hi Thomas,
I've added a Closed() signal to TPad which is called when a pad is
closed or deleted. Just connect a slot to this Closed() signal. In the
slot you can do what you want. Example:
TPad *p = new TPad(...)
p->Connect("Closed()", "MyClass", myclassptr, "PadClosed()");
where MyClass::PadClosed() is used to handle the pad closure.
Cheers, Fons.
On Tue, 2002-07-16 at 13:05, Thomas Bretz wrote:
> Hi Rene,
>
> that's not what I was asking for... I don't want my object to be
> destroyed...
>
> Thomas.
>
> Rene Brun wrote:
> >
> > Yes,
> >
> > in the constructor of your object, add the statement
> > SetBit(kCanDelete);
> > and your object will be automatically deleted when closing the pad.
> >
> > See many examples in ROOT itself.
> >
> > Rene Brun
> >
> > On Tue, 16 Jul 2002, Thomas Bretz wrote:
> >
> > > Hi all,
> > >
> > > if I have a TObject appended to a pad, is there a way for the TObject to
> > > be noticed if the pad is closed (deleted)?
> > >
> > > Thanks,
> > > Thomas.
> > >
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:00 MET