home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / intervie / 3228 < prev    next >
Encoding:
Text File  |  1992-11-20  |  2.1 KB  |  46 lines

  1. Newsgroups: comp.windows.interviews
  2. Path: sparky!uunet!wupost!cs.utexas.edu!sun-barr!ames!pacbell.com!att-out!walter!corral!doron
  3. From: doron@corral.bellcore.com (Doron Shalmon)
  4. Subject: Re: Adding menuitem after window is mapped
  5. Message-ID: <1992Nov20.200622.21909@walter.bellcore.com>
  6. Followup-To: comp.windows.interviews
  7. Sender: news@walter.bellcore.com
  8. Nntp-Posting-Host: 128.96.148.248
  9. Organization: Bellcore
  10. References: <1992Nov20.060140.5973@walter.bellcore.com>
  11. Date: Fri, 20 Nov 92 20:06:22 GMT
  12. Lines: 32
  13.  
  14. In article <1992Nov20.060140.5973@walter.bellcore.com> doron@leis.bellcore.com (Doron Shalmon) writes:
  15. >I'm trying to add MenuItems to a Menu dynamically after
  16. >the window with the menubar has already been mapped.
  17. >However, the new items do not appear when I pull down
  18. >the menu.  I know that the items are appended properly,
  19. >because I can drag down below the bottom of the menu
  20. >to where the new item should be, and it does execute
  21. >the invisible item's action.  How can I get the added
  22. >menu items to appear the next time the menu is pulled
  23. >down??
  24.  
  25. After further experimentation, it turns out that the problem
  26. is not with adding items after the enclosing window is mapped,
  27. but with adding items after the pulldown menu has been opened
  28. already.  It seems that this is because the pulldown menu's
  29. PopupWindow only computes its geometry the first time it
  30. is mapped.  Do I need to unbind the menu's PopupWindow
  31. after adding new menu items, so that the next time it is
  32. mapped it will recompute its geometry?  Is this safe?
  33.  
  34. -- Doron
  35.  
  36. ===========================================================================
  37. Doron Shalmon                 Internet    doron@yogi.leis.bellcore.com
  38. 444 Hoes Lane (RRC 4B-1125)   CompuServe  72330,3307
  39. Piscataway, NJ 08854          VOICE       (908) 699-8133
  40.                               FAX         (908) 336-2982
  41.  _   _        _  _   _   _    
  42. |_> |_ |  |  |  | | |_> |_    "All opinions expressed are mine, and do not
  43. |_> |_ |_ |_ |_ |_| | \ |_     necessarily represent those of my employer,
  44.                                 Bell Communications Research (Bellcore)"
  45. Bell Communications Research
  46.