Newsgroups: comp.windows.open-look Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!parc!news From: Lovstrand@EuroPARC.Xerox.COM (Lennart Lovstrand) Subject: Sticky Abbrev Menu Button Arrows Message-ID: <1991Apr18.192452.7307@parc.xerox.com> Sender: news@parc.xerox.com Organization: Rank Xerox EuroPARC, Cambridge, UK Date: Thu, 18 Apr 1991 19:24:52 GMT OK, here's another one: If you try to remove a PANEL_ABBREV_MENU_BUTTON while running its action, the label will disappear but the little menu arrow will stay behind. The cause seems to be that the redisplay code for the button insists of repainting the arrow (unshading it) even though both its XV_SHOW attribute has been turned off and an xv_destroy_safe() action has been issued against it. Does anyone know about a fix or a workaround? Thanks, --Lennart Here's a code fragment to repeat by: #include #include #include Panel_item button; void menu_selection(menu, item) Menu menu; Menu_item item; { xv_set(button, XV_SHOW, FALSE, NULL); xv_destroy_safe(button); } main(argc, argv) int argc; char **argv; { Frame frame; Panel panel; Menu menu; xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0); frame = xv_create(NULL, FRAME, NULL); panel = xv_create(frame, PANEL, NULL); menu = xv_create(NULL, MENU, MENU_STRINGS, "foo", "bar", "baz", NULL, MENU_NOTIFY_PROC, menu_selection, NULL); button = xv_create(panel, PANEL_ABBREV_MENU_BUTTON, PANEL_LABEL_STRING, "Hit me", PANEL_ITEM_MENU, menu, NULL); xv_main_loop(frame); } -- --Lennart R _A _ N_ K Rank Xerox EuroPARC, 61 Regent St, Cambridge, UK \/ |_ |_) | | \/ Ackpft, Sun-4/75 at EuroPARC, SunOS Release 4(1.1)-2 /\ |_ | \ |_| /\ TOPS-20 Command processor 7(103)-2 [alpha] E u r o P A R C