Hi,
the following code used to work in the version 4.00.08 for windows but does not work for version 4.01.04 or higher.
The problem is that when I run the code I can no longer select a sub pad by clicking the middle mouse button. I can only select the base canvas.
fCanvas = new TRootEmbeddedCanvas(“Canvas”, this, 800, 400);
AddFrame(fCanvas);
for (i=0 ; i<2 ; i++) {
fGraph[i] = new TGraph(1024);
}
fCanvas->GetCanvas()->Divide(2, 1, 0, 0);
fCanvas->GetCanvas()->cd(1);
for (i=0 ; i<2 ; i++) {
for (j=0 ; j<1024 ; j++) {
fGraph[i]->SetPoint(j, j, (double)rand()/200);
}
fCanvas->GetCanvas()->cd(i+1);
fGraph[i]->Draw(“AL”);
}
fCanvas->GetCanvas()->Modified();
fCanvas->GetCanvas()->Update();
MapSubwindows();
MapWindow();
Thanks for help
Matthias