Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!agate!twinkies!lippin From: lippin@twinkies.berkeley.edu (The Apathist) Newsgroups: comp.sys.mac.programmer Subject: Re: Simulating a Menu Bar with Pop-Up Menus Message-ID: <1989Dec4.013339.20945@agate.berkeley.edu> Date: 4 Dec 89 01:33:39 GMT References: <9095@hoptoad.uucp> <1989Nov28.053644.28100@agate.berkeley.edu> <2880@murtoa.cs.mu.oz.au> Sender: usenet@agate.berkeley.edu (USENET Administrator;;;;ZU44) Reply-To: lippin@math.berkeley.edu Organization: Authorized Service, Incorporated Lines: 29 Recently rob@murtoa.UUCP (Robert Wallen) wrote: > >On a related issue. Has anyone worked out how to hack the PopUpMenuSelect so >that it doesnt present the users with that stupid blank rectangle and the >scroll arrow if it is too close to the edge of the screen. PopupMenuSelect, when used as directed, produces the correct result -- it goes to some trouble to put the item you choose under the mouse, and this can produce some funny looking scrolling menus if you're near the edge of the screen. But when you're perverting PopupMenuSelect to serve other ends, the way menus are positioned may not be appropriate. The best way I've found around this is to have the MDEF misinterpret the hPopUpMsg. For my menu bar in a window, for example, I use this to bounce the menu off the edge of the screen, so that it never has to scroll (givben sufficiently short menus, of course. LSC 4.0, on the other hand, seems to use it to get the menu positioned properly underneath the title bar of the window -- in extreme cases, making the menu too small to use; Apple didn't (and had no reason to) provide for the possibility of scrolling menus less than 3 items long. (BTW, I haven't been able to reproduce David Phillip Oster's bus error when trying this on my mac II, but perhaps I haven't tried hard enough.) --Tom Lippincott lippin@math.berkeley.edu "Truth is the most valuable thing we have. Let us economize it." --Mark Twain, "Pudd'nhead Wilson's New Calendar"