GetEvent() delivers only value for left mouse button

Hi @all,

I have problems to understand why I get no response from gPad->getEvent() for other events than the left mouse button in the macros I’ve attached below.

The first macro draws a histo and calls a second macro with the exec method.
In the second one I try to handle clicks with the left and middle mouse button but the return value is only 11.
Why I cannot see a response from rollovers, mouse mouvements or the middle mouse button ?
klick.C (267 Bytes)
macro1.C (240 Bytes)

Hi,

Please try to use this format: can1->AddExec("ex", ".x klick.C");
instead of: TExec ex("ex",".x klick.C"); ex.Draw();
Cheers, Bertrand.

Hi Bertrand,

thank you very much. It worked out.

Cheers,
Joerg

Hi Joerg,

You’re welcome! And if you need more infos about how to use TExec, you can take a look at its documentation:
http://root.cern.ch/root/html/TExec.html

Cheers, Bertrand.