Hello Rooters,
How can I execute the same thing than when I press the refresh button of the toolbar but in command line ?
Thanks in advance
Jérémie
Hello Rooters,
How can I execute the same thing than when I press the refresh button of the toolbar but in command line ?
Thanks in advance
Jérémie
Have you tried:
gPad->Update();
gPad->Modified();
Of course, The fact is that I have a TCanvas containing lot of pads and I want all of them refreshed. I can of course loop on the primitives of the canvas and apply modified() and update() for each but for other practical reasons, I wanted to be able to use by command line the refress buton (and emmiting its signal)
I have found an alternative solution with the command :
gPad->GetCanvas()->Browse((TBrowser*)((TList*)gROOT->GetListOfBrowsers())->At(0));
It perfectly works if the current browser is the first of the list but if different browser are openned, I don’t know how to obtain the pointer to the active browser…
Hi,
Here is what the “Refresh” button does:
case kOptionRefresh:
fCanvas->Paint();
fCanvas->Update();
break;
So from the command line you could try:
gPad->GetCanvas()->Paint();
gPad->GetCanvas()->Update();
Cheers, Bertrand.
It’s doing the job ! Thank you !