On 07.04.2010, at 19:17, K.C. Babb wrote:
> This is probably not new, but a couple of forum searches didn't yield a 
> definitive answer...
>
> FLTK Version: 1.1.9
> Environment: Exceed on Windows
>
> If I have a set of Fl_Menu_Item's which contain, among other things, 
> selections which have submenus, is there a way to prevent clicking on the 
> higher-level item from undisplaying the whole menu?  I guess I'm looking for 
> the Windoze-ish behavior where when you click on a menu item which has a 
> submenu, the submenu stays up so you can then click on the desired selection 
> from it.  For example, if my menu item hierarchy looks like:
>
> File
>    Open
>      Page 1
>      Page 2
>      Page 3
>      ....
>
> and they click on File and then click on Open, I want the "Page n" list to 
> stay up until they click on one of those.  Possible without great klugey 
> machinations?

I played a little with test/menubar[.cxx], and I think that I can see
what you mean. Whenever you release the mouse button, the menu closes.

This is independent of whether you
  (a) click on the top level menu and drag the mouse (holding the button)
or
  (b) click/release on the top level menu and drag the mouse w/o holding 
a button.

"Native" windows menus (tested with explorer, firefox, and the "Start"
menu under XP) don't close if you release the mouse button over a
submenu entry (that is not a leaf of the menu tree). Is this what you
mean?

If yes, then the requested change would be: don't close (dismiss) the
menu if the mouse button is released over a menu item that is not a
leaf of the menu tree (i.e. that has (or is) a submenu).

To Ian: I see the described behaviour on Windows, so I don't think
that this is a WM problem or such.

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to