Re: How to get kButton3... in TObject::ExecuteEvent

From: Ilka Antcheva <>
Date: Wed, 16 Nov 2005 17:03:56 +0100

Hi Stanislav,

I was writing the same when I got your message. It is good that you found the solution yourself.

Best regards, Ilka

Stanislav Nesterov wrote:

> Hi,
> I would like to answer to my own question:
>> Is it possible may be to disable context menu only for the object?
>> And then will all the events pass safely?
> It works if I disable context menu in my object. So far so good! At
> least I can work with the "ProcessedMessage" signal.
> Thank you again, Ilka.
>> Ilka Antcheva wrote:
>>> Hi Stanislav,
>>> I see no problem to get events as kButton3Down and kButton3Double
>>> from the canvas. In the tutorials example
>>> $ROOTSYS/tutorials/guitest.C the kButton3Down is used for printing
>>> some information instead of showing the context menu when the button
>>> 3 is pressed (event kButton3Down appears). To see that:
>>> - run guitest.C;
>>> - select Test menu / Dialog...;
>>> - click on Tab 3;
>>> - fill the histograms by using Start/Stop buttons.
>>> Then click with the right mouse button on the right - as usual you
>>> see the context menu; if you do the same on the left - some info is
>>> printed in the root prompt. Last behavior is implemented in the
>>> TestDialog::HandleEmbeddedCanvas method which is connected to the
>>> "ProcessedEvent(Int_t,Int_t,Int_t,TObject*)" signal of the canvas.
>>> You can replace the kButton3Down with kButton3Double and the
>>> information will be printed according to this setting any time the
>>> event kButton3Double appears.
>>> Cheers, Ilka
>>> Nesterov Stanislav wrote:
>>>> Hello Rooters,
>>>> I've encounter problem when I tried to get event kButton3Down and
>>>> kButton3Double in my class in ExecuteEvent() method. I've looked
>>>> through the TCanvas.cxx (HandleInput) and have found out that it is
>>>> really not supposed to work. Can you please tell me the right way
>>>> to get this button to be passed to my object?
>>>> For now I have to use ProcessedEvent() signal to get an access. But
>>>> still it works only for the kButton3Down, but there is no
>>>> kButton3Double event at all. (So far I do get double click if I use
>>>> kButton3Up - but I think that is not right!)
>>>> The disatvantage of the ProcessedEvent() signal connection for me
>>>> that I have to connect TCanvas every time for all existing objects.
>>>> Hope you can help,
>>>> --
>>>> Best regards,
>>>> Stanislav.
Received on Wed Nov 16 2005 - 17:04:02 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET