I’m writing a small GUI and I’d like to have a set of TCanvas’s which I can tab between. So I’d like a TGTab, where each tab has a frame with a TCanvas inside it.
The N=1 solution was just to use a TRootEmbeddedCanvas.
For N>1, I need to put the canvas inside the TGTab somehow.
I’ve tried the most intuitive thing:
(inside my TGMainFrame constructor):
for (int i=0;i<Ntabs;i++)
fTabFrames[i] = fTab->AddTab(groupNames[i]);
fCanvas[i] = new TRootEmbeddedCanvas(cname,this,400,200);
This generates the Tab correctly, but the resulting canvas does not appear inside the tab environment, but instead it floats freely.
Is there something simple that I’m doing wrong?