🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #930

Resizing menus

#930
From: Steven T. Abell
Date: Thu, 10 Sep 1992 19:48
25 lines
1320 bytes
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
Technical Details
Message-ID: <fztn6md.abell@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!abell

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!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