Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!cse!texas!netkeeper!sparkle!achan From: achan@sparkle.tdd.sj.nec.com (Amy Chan) Newsgroups: comp.windows.x.motif Subject: Re: pointer on children of a widget. Keywords: XtParent Message-ID: <1991Jun10.181238.1494@sj.nec.com> Date: 10 Jun 91 18:12:38 GMT References: <234@taloa.unice.fr> Sender: news@sj.nec.com Organization: NEC-AM TDD, San Jose, California Lines: 26 Nntp-Posting-Host: 131.241.1.222 In article <234@taloa.unice.fr> cambon@mimosa.unice.fr (Thierry Cambon) writes: >Can someone tell me how to get a pointer on the children >of a given widget ? I know the toolkit macro XtParent(w) >to get the parent id. Is there a similar funtion to get >the children id. ? > > Thanks. For X11R4, you can use the following: WidgetList children; Cardinal num_children; XtVaGetValues(parent, XtNchildren, &children, XtNnumChildren, &num_children, NULL); which will return the children as a widget list and the number of children on that list. Amy Chan -- Amy Chan | E-Mail: NEC America | INET: achan@tdd.sj.nec.com 110 Rio Robles | UUCP: ...{decwrl,oliveb}!necsun!achan San Jose, CA 95134 |