[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: selecting a pop-up menu item
- To: email@example.com (Jeffrey B Kane)
- Subject: Re: selecting a pop-up menu item
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Fri, 11 Dec 1992 11:53:57 -0600
- Cc: info-mcl
>I've got a quick pop-up-menu question (the doc are very sparse).
>I've defined a pop-up-menu with several items, but I need to change the
>selection under program control (instead of having the user click on it).
>Using the function (menu-select my-pop-up n) with n being some integer,
>does not seem to change the menu item as it is displayed.
>As an example, using the pop-up-menu.lisp file, example I would
>like to have:
>;;; What I want is to be able to use
>(menu-select my-pop-up 2)
>(menu-select my-pop-up 1)
>;; to change the menu that is displayed
What you need to say is:
(setf (pop-up-menu-default-item my-pop-up) 2)
(setf (pop-up-menu-default-item my-pop-up) 1)
Whether you use invalidate-view or view-focus-and-draw-contents depends
on whether you want the drawing to happen right now
(view-focus-and-draw-contents) or the next time event processing happens