[fltk.general] Making a menu_bar submenu close when the menu_bar loses focus

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Making a menu_bar submenu close when the menu_bar loses focus "'pvr... 05:11 Sep 15 top right image
 
When I open a top-level sub-menu in my Fl_Menu_Bar I then find that it stays dropped down when I move focus away from the menu_bar. The only times it doesn't is if 1) I pass the mouse over another menu item, in which case the second sub-menu drops down, or 2) I click on the menu_bar away from any menu items. This has the effect that all other events in my app seem to be blocked, especially the app close event which is the most infuriating.

I presume I need to handle the UNFOCUS event in the menu_bar, but how do I cause the sub-menu to close.

Alternaively I would like to generate a system noise alert that window close is being ignored.

I am using a recent (23/4/2020) snap-shot of 1.4 on W10 (2004

Thanks in advance
Phil.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/b0aca008-00ec-4b57-9d48-94922f65208bn%40googlegroups.com.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2020 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.