From: tom (Tom McClure)

Subject: Re: [pcspr4130] Modifying pop-up menu dynamically?

Date: 1996-11-12 22:38

Sam--

You wrote:
  Is there a way to dynamically modify a pop-up menu? Lets say there are
  3 menu items optA, optB and optC. Sometimes I want to disable optA. Is
  there a way to do it? (I prefer to grey-out this menu item. But
  deleting the menu item and reinserting it later is also ok)

Sure!  I myself had forgotten the name of the function which does
this, so I did an (apropos 'menu) and scanned the results to find
set-menu-item-available-p, which can be used dynamically even on the
menus within the development environment:

(set-menu-item-available-p (third (menu-items top::*windows-menu*))
                           nil)

Typing this into the toploop will gray out the third item in the
"Windows" menu on the Allegro 3.0.1 menubar, ie the item which brings
up the History window (the second item on this menu is the separator
line).

 -tom

Tom McClure - <franz.com at tomj> - Franz Inc., 1995 University Ave, Suite 275
(510) 548-3600, FAX 548-8253 - Berkeley, CA  94704-1072
ACL FAQs: www.franz.com/faq.html or ftp.franz.com/pub/*faq

**Please** cc <franz.com at pc-support> on all mail related to this matter.
Be sure to include tracking number [pcspr4130] in the subject line.