Path: utzoo!attcan!uunet!husc6!bloom-beacon!MITVMA.MIT.EDU!spa%hara.fctunl.rccn.pt From: spa%hara.fctunl.rccn.pt@MITVMA.MIT.EDU Newsgroups: comp.windows.x Subject: Re: widget name Message-ID: <8904122130.AA02620@hara.fctunl.rccn.pt> Date: 12 Apr 89 21:30:07 GMT References: <0608413542@PTIFM.IFM.RCCN.PT> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 28 > I am working on an application that uses numerous widgets. For one > of the callback functions of a CommandWidget, I need to know the name > of the widget that called the callback. How can I do this? > > > Thanks in advance. > > Russ Cook > NC State University > hwa@ece-csc.ncsu.edu Have your callback routine do: 1) an XtGetValues on the XtNlabel argument (slow but safe) 2) use the value of w->core.name Solution 2 is only valid if you #include --- Salvador Pinto Abreu BITNET/Internet: spa@hara.fctunl.rccn.pt or: FCT_SPA@PTIFM.BITNET UUCP: ...{mcvax,inria}!inesc!unl!spa PSI/VMS: PSI%(+2680)05010310::SPA ARPA: spa%hara.fctunl.rccn.pt@mitvma.mit.edu Phone: (+351) (1) 295-4464 x.0560 Fax: (+351) (1) 295-4461 Snail: Dept. de Informatica, Universidade Nova de Lisboa 2825 Monte Caparica, PORTUGAL