home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6096 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!abell
  3. From: abell@netcom.com (Steven T. Abell)
  4. Subject: Resizing menus
  5. Message-ID: <fztn6md.abell@netcom.com>
  6. Date: Thu, 10 Sep 92 19:48:46 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. Distribution: na
  9. Keywords: menu menucell
  10. Lines: 25
  11.  
  12. I'm trying to change the title of MenuCells at run time, like this:
  13.  
  14. [menuCell setTitleNoCopy:"NewTitle"];
  15.  
  16. where the new title is longer than the old title. Clearly something must
  17. be resized, such as in:
  18.  
  19. [[menuCell controlView] sizeToFit];
  20.  
  21. Unfortunately, this doesn't do it. This resizes the Matrix containing the
  22. MenuCell, but doesn't resize its Menu, so the bezel gets overwritten and 
  23. looks crappy. I tried following up the superview chain to find the Matrix's
  24. Menu, but I ran into this thing that called itself a FrameView (undocumented)
  25. which had no superview.
  26.  
  27. Menu has a sizeToFit method that will do what I want (apparently), but I
  28. haven't found a reasonable way to invoke it, given only a pointer to a
  29. MenuCell in an arbitrary submenu.
  30.  
  31. I must be missing something obvious. Can somebody help me out, or give me
  32. an appropriate RTFM pointer?
  33.  
  34. Thanks,
  35.  
  36. Steve abell@netcom.com
  37.