Re: accessing subpads

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 03 2000 - 15:38:02 MET


Hi Colin,
Do:

Root > TCanvas *c1 = new TCanvas("c1");
Root > c1->Divide(1,2);
Root > c1->cd(2);
Root > TPad *c1_2 = (TPad*)gPad;
Root > c1_2->Cd(1);
Root > gPad->SetLogy();

Rene Brun

C. Bernet wrote:
> 
> Hello !
> 
> I would like to divide my canvas c1 into 2 pads (c1_1 and c1_2), and then
> divide c1_2 into 2 sub pads.
> My problem is that I have to set log scale on one of these 2 subpads. If
> you right click on it, you see its name is c1_2_1, and I expected
> c1_2_1->SetLogy() to work. Instead, I get the message :
> 
> Error: No symbol c1_2_1 in current scope
> 
> Yet c1_1->SetLogy() works fine !
> 
> I'm sure I miss an important point here... Does anybody know a clean way
> to do that without using the mouse ?
> 
> Thanks a lot.
>                 Colin



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET