TGLBContainer *lbc = (TGLBContainer *)fListBox->GetContainer(); lbc->Connect("CurrentChanged(TGFrame*)", "MyGuiClass", this, "CurrentChanged(TGFrame*)"); void MyGuiClass::CurrentChanged(TGFrame *f) { TGTextLBEntry *lbe = (TGTextLBEntry *)f; printf("\nMyGuiClass::CurrentChanged() : Id = %d, Text = %s\n", lbe->EntryId(), lbe->GetTitle()); }