Xref: utzoo comp.windows.x.motif:2466 comp.windows.x:34949 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!bofin!cjmchale From: cjmchale@cs.tcd.ie (Ciaran McHale) Newsgroups: comp.windows.x.motif,comp.windows.x Subject: Re: How do I bind multiple functions to a buttonpress? Keywords: Motif, mwmrc, Resources Message-ID: <1991Apr5.175019.14043@cs.tcd.ie> Date: 5 Apr 91 17:50:19 GMT Article-I.D.: cs.1991Apr5.175019.14043 References: <922@edstip.EDS.COM> Organization: DSG, Dept. of Comp. Sci., Trinity College, Dublin. Lines: 22 In <922@edstip.EDS.COM> kevin@edstip.EDS.COM (Kevin Brown) writes: >Using Motif 1.0 and X11R4, is it possible to bind multiple functions >to one button press event. I know that twm contains a function called >f.function, which allows the user to name and create a function. Is >there an equivalent in Motif? Use XtAddCallback() to bind function foo to the ButtonPress event on a widget. Then use XtAddCallback() again to bind function bar to the widget for the same event type. Guess what? Both functions (foo and bar) will be invoked (in order of their binding) when the button is pressed in the widget. Amazing, isn't it :-) And now for my next trick ... :-) Ciaran. -- Ciaran McHale "There's a lot to be said for verbosity." ---- Department of Computer Science, Trinity College, Dublin 2, Ireland. \ / Telephone: +353-1-772941 ext 1538 FAX: +353-1-772204 \/ Telex: 93782 TCD EI email: cjmchale@cs.tcd.ie