home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / motif / 8823 < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.0 KB  |  52 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!think.com!paperboy.osf.org!paperboy!drand
  3. From: drand@spinner.osf.org (Douglas S. Rand)
  4. Subject: Re: popping up a PopupMenu using Btn1
  5. In-Reply-To: tom@teal.csn.org's message of 25 Jan 93 16:07:22 GMT
  6. Message-ID: <DRAND.93Jan25154536@spinner.osf.org>
  7. Sender: news@osf.org (USENET News System)
  8. Organization: Open Software Foundation
  9. References: <C14G2D.Gvu@csn.org> <1993Jan22.160053.24231@unislc.uucp>
  10.     <DRAND.93Jan22174724@spinner.osf.org> <C1F3GC.G7L@csn.org>
  11. Date: 25 Jan 93 15:45:36
  12. Lines: 38
  13.  
  14. In article <C1F3GC.G7L@csn.org> tom@teal.csn.org (Tom Schutter) writes:
  15.  
  16.    > Naughty, naughty, playing with a widget's privates :) .  Seriously,
  17.    > don't do this.  This is not the only thing which must happen.  That is
  18.    > why there is a data abstraction layer between you and the widget
  19.    > internals.
  20.  
  21.    But if the widget is not providing the functionality required, sometimes you
  22.    gotta break the rules.
  23.  
  24.    Does OSF have an answer as to why the XmNmenuPost resource does not work?
  25.  
  26. It depends what your question is.  XmNmenuPost does work.  If the
  27. RowColumn had menuPost set for button1,  and was posted with button1
  28. then button1 would unpost it.  Now a different argument is whether
  29. the menu should also come down on other button presses.
  30.  
  31. To post a popup menu one needs to:
  32.  
  33. 1) Set popupEnabled on the popup menu
  34.  
  35. 2) Set menuPost to the event specification that the menu will be posted
  36.    on (very important,  lots of hand waving behind the screen).
  37.  
  38. 3) Set an event handler on the posting widget which manages the menu
  39.    on the appropriate event.
  40.  
  41. If steps 1, 2 and 3 are followed,  you should get proper behavior.
  42.  
  43. Now,  in a future release,  you'll just have to set popupEnabled to
  44. a magic value and step 3 will happen for you.  But for now,  you
  45. have to set it yourself.
  46.  
  47. --
  48. Douglas S. Rand <drand@osf.org>        OSF/Motif Dev.
  49. Snail:         11 Cambridge Center,  Cambridge,  MA  02142
  50. Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
  51. Amateur Radio: KC1KJ
  52.