Hi Christian, you can do: ((TGCompositeFrame*)TGListBox->GetContainer())->GetList()->GetSize() but to make it easier I've added a method GetNumberOfEntries(). Cheers, Fons. On Sunday 09 December 2001 23:17, cstrato@EUnet.at wrote: > Dear Rooters > > How can I get the number of items added to TGListBox? > > Sorrowly, TGListBox->GetList()->GetSize() does not work > since it displays a positive number, even if TGListBox > is still empty. > > > Thank you in advance for your help. > > Best regards > Christian > ---------------------------------- > C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a > V.i.e.n.n.a, A.u.s.t.r.i.a -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:11 MET