Access to the refresh button of the toolbar

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


Have you tried:


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 :


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…


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 !

1 Like