stein@WRC.XEROX.COM (Adam Stein) (05/17/91)
I have button menu entries that are basically toggles. I would like to be
able to have a user select a menu entry, and when he brings up the menu
again, be able to show what was last selected. I've seen other window
systems that are able to put a check mark next to the menu entry (i.e. GEM).
My question is how to accomplish this. I couldn't find a way to put a check
mark (or equivalent) next to a menu entry so I'm assuming it can't be done.
I've tried using MENU_INVERT and MENU_SELECTED to somehow highlight the entry
I want. Neither had a visible effect that I could see. I used xv_get before
and after to make sure the attribute was being set (it was), but nothing
showed up visibly.
My menu is being initialized by:
menu = (Menu) xv_create(NULL, MENU, MENU_STRINGS, ...);
and I'm setting the attribute (either MENU_INVERT or MENU_SELECTED) by:
menu_item = (Menu_item) xv_get(menu,MENU_NTH_ITEM,entry);
xv_set(menu_item,attribute,TRUE,NULL);
where <entry> is the menu entry I want to hightlight (or checkmark) and
<attribute> is the attribute that will do it (again I tried MENU_INVERT and
MENU_SELECTED without success). Any ideas would be appreciated either in
sample code or pointers to PD programs that do what I'm looking for. Thanx
in advance.
Adam Stein
Adam Stein @ Xerox Corporation Email: stein.wbst129@xerox.com
stein@arisia.xerox.com
Disclaimer: Any/All views expressed ...!uunet!xerox.com!stein.wbst129
here have been proved to be my own. Hopefully one of the above will work.