fObjectsBrowserFrame->RemoveFrame(button2);
delete button2;
Layout();
Resize();
MapSubwindows();
gSystem->ProcessEvents();
But the button is still kind of drawn even though I can’t click it.
How should I do ?
Thanks for the reply.
It did not work for me on Linux. Please find attached a short example. I must be doing something else wrong.
To build call “make”.
if (button2) {
// remove the button from its container
fObjectsBrowserFrame->RemoveFrame(button2);
// hide it
button2->UnmapWindow();
// remove its parent
button2->ReparentWindow(gClient->GetDefaultRoot());
// finally delete it
delete button2;
button2 = 0;
}
Layout();
}
[/code]
Cheers, Bertrand.