Hi Rutger,
Thanks for your help.
I modified your proposed code. It fits my uses, but could you test it
also ?
//___________________________________________________________________________
void TGTab::RemoveTab(Int_t tabIndex)
{
// Remove container and tabtab of tab with index tabIndex.
// Does NOT remove the container contents!
if (tabIndex < 0) return;
TGFrameElement *elTab, *elCont ;
Int_t count = 0 ;
TIter next(fList) ;
next() ; // skip first container
while ((elTab = (TGFrameElement *) next())!=0) {
elCont = (TGFrameElement *) next();
if (count == tabIndex) {
elTab->fFrame->UnmapWindow() ;
elCont->fFrame->UnmapWindow() ;
RemoveFrame(elTab->fFrame); // takes care of deleting
elTab->fFrame
RemoveFrame(elCont->fFrame);
if (tabIndex == fCurrent) {
// we should select another tabtab only if the current is the
one we remove
SetTab(0) ;
}
break;
}
count++;
}
}
-- APHECETCHE Laurent (mailto:Laurent.Aphecetche@subatech.in2p3.fr) SUBATECH-Ecole des Mines de Nantes-4 rue Alfred Kastler-44070 NANTES cedex 03 TEL (+33/0) 2 51 85 84 17 - FAX (+33/0) 2 51 85 84 24 WWW: http://www-subatech.in2p3.fr/~photons