Re: Is it possible to hide a subpad ?

Rene Brun (Rene.Brun@cern.ch)
Mon, 09 Nov 1998 08:10:34 +0100


Wouter Hulsbergen wrote:
>
> Dear all,
>
> One can draw overlapping subpads ('primitives') in a TPad. Is it
> possible to hide some of these pads, for layer use ?
>
> I have made an online histogram displayer which cycles between different
> sets of histograms and corresponding TPad division. I thought it would
> be a waste to create and destroy them all the time.
>
> Thanks,
> Wouter

Hi Wouter,
You can remove this pad from the list of primitives of its mother pad.
If pad is the pointer to the pad you want to hide
if mother is the pad containing this pad
do:
mother->GetListOfPrimitives()->Remove(pad);
mother->Modified();
mother->Update();

To show the pad again
mother->GetListOfPrimitives()->Add(pad);
mother->Modified();
mother->Update();

The next version of Root includes the possibility to define
transparent pads and pads with different levels of opacity.

Rene Brun