Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!IRIS49.BIOSYM.COM!pete From: pete@IRIS49.BIOSYM.COM (Pete Ware) Newsgroups: comp.windows.x.motif Subject: pointer on children of a widget. Message-ID: <9106102138.AA17147@iris49.biosym.com> Date: 10 Jun 91 21:38:55 GMT References: <234@taloa.unice.fr> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 32 Just as a rough, off the cuff answer, cuff answer, try the following. Beware that you should not modify the list of children. Also, it does not return the children's children, etc. #include #include void GetChildren (shell, num_children, children) Widget shell; Cardinal *num_children; Widget **children; { Arg args[10]; Cardinal cnt; *num_children = 0; *children = NULL; if (!XtIsComposite (shell)) return; cnt = 0; XtSetArg (args[cnt], XmNnumChildren, &num_children); ++cnt; XtSetArg (args[cnt], XmNchildren, &children); ++cnt; XtGetValues (gw, args, cnt); } --pete Pete Ware / Biosym / San Diego CA / (619) 546-5532 email: pete@biosym.com