Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bbn.com!nic!news.cs.brandeis.edu!chaos.cs.brandeis.edu!nm From: nm@chaos.cs.brandeis.edu (Nicolas Mercouroff) Newsgroups: comp.sys.mac.programmer Subject: (Un)highlighting of menu Summary: Why my menu doesn't unhighlight ? Keywords: Menu, MDEF, highlight, System 6.0 Message-ID: <1991Mar5.154920.10808@news.cs.brandeis.edu> Date: 5 Mar 91 15:49:20 GMT Sender: Nicolas Mercouroff Organization: Brandeis University Lines: 46 I am trying to develop a program, and I have a problem with the highlighting of menus in system 6.0.x : Apple File Edit DATA +-----------+ | data01 -> | | ... +---------+ | DATAnn ->| DATAnn_1| | ... | DATAnn_2| | DATA80 ->| ... | +----------| DATAnn_i| +---------+ I have a menu (named "DATA" for example), attached to the menu bar, of 80 items (it's long, I know, but it's obliged). To each of these 80 items ("DATA01" .. "DATA80") is attached a sub- menu of various number of items ("DATAnn_1" to "DATAnn_i", with i from 1 to ~20). When I click on the menu title "DATA" in the menu bar, the menu unrolls. Then I "drag" with the cursor to an item "DATAnn", and the sub-menu unrolls. Then I drag to an item "DATAnn_#", and I release the button of the mouse. Both menus ("DATA" and "DATAnn") reroll, and "MenuSelect" returns the proper value selected ("DATAnn_#" of menu "DATAnn"). The problem arises when I select the menu "DATA", then an item "DATAnn", but I don't select an item of the sub-menu : I release the button with the arrow out of the sub-menu (on its right). "MenuSelect" returns 0 in the high order word, of course (nothing selected), both menus reroll, BUT the name of the main menu stays HIGHLIGHTED in the menu bar ! Even when I call HiliteMenu(0) after MenuSelect, the menu title stays highlighted FOREVER (until I quit or switch to another program). The only way to unhighlight the menu is to call DrawMenuBar each time MenuSelect is invoked, with a rather ugly result ... Where is the problem ? Is it with MDEF of system 6.0.#, or with my program ? Does someone see a solution ? Many thanx in advance ... P.S.: Sorry for the laboured explanations, I hope it's understandable besides my wicked English (I'm French). -Nicolas. nm@cs.brandeis.edu