How does gStyle->ToggleEventStatus() work?

Hello, what is the purpose of the ToggleEventStatus, ToggleEditor and ToggleToolBar methods of the TStyle class? I tried to enable EventStatus writing gStyle->ToggleEventStatus without any effect. To enable it, I have to write c->ToggleEventStatus() where c is a TCanvas object.
The same is true for ToggleEditor and ToggleToolBar.

They activate the event statut and toolbar on a canvas.

   TCanvas *c1 = new TCanvas("c1", "c1",10,45,700,548);

Hi Olivier,
yes what you propose works perfectly.
The “problem” comes from the class TStyle. It seems I cannot enable EventStatus from “gStyle->ToggleEventStatus()” whereas TStyle provides such method. So I am wondering what is the purpose of these methods in the class TStyle.

Yes you are right it has now effect. My guess is that it should turn on the EventStatus for all canvases created after this call.

Doing a quick “grep” on the sources it seems that gStyle->GetShowEventStatus() is not used…

Yes, this is what I expected, that’s why I asked :smiley:

I opened a Jira ticket with this question :