TGListBox double click: not working

Hi ROOTers
Double click signal from TGListBOx was working until recently. I borrow a simple example (attached) and I notice the double click signal is not working there either in the current ROOT version.
I wonder if anybody can reproduce the problem.


My ROOT vers is

listBox.C (3.75 KB)


I’ll check, but in the meanwhile, you can now connect directly to one of these TGListBox signals:

   virtual void DoubleClicked(Int_t widgetId, Int_t id);
   virtual void DoubleClicked(Int_t id) { Emit("DoubleClicked(Int_t)", id); }
   virtual void DoubleClicked(const char *txt) { Emit("DoubleClicked(char*)", txt); }

Cheers, Bertrand.

Hi Bertrand
I tried implementing your solution. Since now DoubleClicked(Int_t) is a member function of TGListBox, then the only thing I will need to do is connect the TGListBox “double clicked” emit signal to my handling function:

  fListBoxPeaks = new TGListBox(this, 89);

fListBoxPeaks->Connect("DoubleClicked(Int_t)", "SharinganAnalyzer",
			 this, "PrintPeakEntry(Int_t)");

Next I define my handling function:

void SharinganAnalyzer::PrintPeakEntry(Int_t selectedID){

  Printf("Slot HandleContainer dbl_click test(%d)", selectedID);

However this is not working. Am I doing something obviously wrong? I can’t think today…

Hi Cristian,

It works for me with svn trunk…

Cheers, Bertrand.