Re: TPad address.

Rene Brun (Rene.Brun@cern.ch)
Thu, 08 Apr 1999 13:56:10 +0000


Patrice (Pat) wrote:
>
> Hello,
>
> I have a simple request:
> For example:
>
> TPad pad = new TPad("pad","",0.5,0.5,1.,1.);
> pad->Divide(2,3);
> pad->cd(4);
> // I am in pad_4
> // but how to get the pointer on this subpad without
> // using TROOT::FindObject method ?
>
> // why not have: TPad* subpad = pad->cd(4); !!!!!!!!!!!!!!
>

Salut Patrice,
Use the global gPad (in TVirtualPad.h).
gPad always points to the current pad.

Rene Brun