Lisp HUG Maillist Archive

Dynamically generated menus

Hello all
    I have an interface that has a menu bar and a popup menu on a list
box. One of the menus in the menu bar should be more or less identical
to that on the list box. Now, this menu is going to be quite dynamic,
changing its contents on the fly. I note that with popup menus you can
supply a function returning a menu as :pane-menu and simply recreate
the menu when necessary. Is there any way that I can supply this
function or similar) to the menu bar thus saving myself duplicate
code?

    thanks

        Andrew


Re: Dynamically generated menus


On Mar 24, 2006, at 8:13 AM, Andrew Lawson wrote:

>     I have an interface that has a menu bar and a popup menu on a list
> box. One of the menus in the menu bar should be more or less identical
> to that on the list box. Now, this menu is going to be quite dynamic,
> changing its contents on the fly. I note that with popup menus you can
> supply a function returning a menu as :pane-menu and simply recreate
> the menu when necessary. Is there any way that I can supply this
> function or similar) to the menu bar thus saving myself duplicate
> code?


For a menu, you can provide a function for the :items-function  
initarg to dynamically generate the menu items.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:48 UTC