Dear Bertrand,
thanks for a really fast answer, it compiles fine, but this new function never gets called. My listbox is inside a frame:
TGHorizontalFrame *hBframe = new TGHorizontalFrame(this);
fListBox2 = new TGListBox(hBframe, 101);
I have already a signal from it (in ClickResponse) that works 100%:
fListBox2->Connect(“Selected(Int_t, Int_t)”, “MyMainFrame”, this, “ClickResponse(Int_t, Int_t)”);
I added the line
fListBox2->GetContainer()->Connect(“DoubleClicked(TGFrame*, Int_t)”, “MyMainFrame”,
this, “ClickResponseDC(TGFrame*, Int_t)”);
Nothing happens.
If I look what object the fListBox2->GetContainer() gives ( via ->ClassName() ), I can see that the class is:
TGLBContainer
I tried few more things, removed the previous signal(Selected), hBframe->connect(doesnot compile), but nothing, I am still missing something…
sorry
Jaromir
[quote=“bellenot”]Hi jaromir,
In this particular case:
fListBox->GetContainer()->Connect("DoubleClicked(TGFrame*, Int_t)", "MyMainFrame",
this, "DoubleClicked(TGFrame*, Int_t)");
The secont argument of the “DoubleClicked(TGFrame*, Int_t)” signal is the button number
Cheers, Bertrand.[/quote]