How to get Number of subpads

Hello,

I have been trying to find the number of subpads of a pad/canvas in C++. I don’t know the number of divisions on a canvas/pad beforehand. Is there a method like getSubPadCount() which returns the number of subpads so that I can do something like

for( int i=0;i<getSubPadCount();i++){
cd(i);
draw_my_graph(i);
}

thanks,
sami

Maybe this help:Int_t counter = 1; // start from 1, cd(0) set current(mother) pad while(mother->GetPad(counter)) { mother->cd(counter); draw_my_graph(counter); counter++; }Jan

Thank You,

Although this has not solved my problem exactly, helped me to figure out a solution.