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