FLTK logo

RE: [fltk.general] Making a menu_bar submenu close when the menu_barloses focus

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   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 ]

RE: Making a menu_bar submenu close when the menu_barloses focus "'Philip Rose' via fltk.general" Sep 15, 2020  
 

From: Greg Ercolano
Sent: 15 September 2020 16:15
To: fltkgeneral@googlegroups.com
Subject: Re: [fltk.general] Making a menu_bar submenu close when the menu_barloses focus

 

On 2020-09-15 05:11, 'pvr...@btinternet.com' via fltk.general wrote:

> 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.

 

     Sounds like perfectly normal behavior to me.

 

     I get the same behavior from the menubars for e.g. Firefox on Win7, Linux and Mac

     (just checked) and even Windows 7's own file browser menubar.

 

     I don't know if Win10 is different.

 

 

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

 

     By "window close" do you mean the "X" to close the window, and want to ignore it?

     If so, make a callback for the window (which will be called when the "X" is clicked)

     and invoke whatever Win10 API call is needed to generate the system sound effect,

     then simply return from the callback to prevent the window from closing.

 

     (If you wanted the window to close, you'd just call e.g. exit(0);)

 

Thanks Greg, I catch the “X to close” event normally. I am not seeing it as the menu item has the focus. So I don’t think this will help.

 

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/5f60ddc5.1c69fb81.8331b.6ec4SMTPIN_ADDED_BROKEN%40gmr-mx.google.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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