close sub menu on mouse exit
« on: 02 May 2017, 13:46:15 »
Hi,
just wanted to know if there is a way to close a submenu when mouse get out of the menu block.

Thank you

*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: close sub menu on mouse exit
« Reply #1 on: 02 May 2017, 14:04:15 »
Currently the following hack seems to work:
menuBar->connect("MouseLeft", [=](){ menuBar->mouseNoLongerDown(); });

I've added a closeMenu function to the github version (which will become 0.7.5 in a few months). With that version you will be able to write the following, which makes slightly more sense:
menuBar->connect("MouseLeft", [=](){ menuBar->closeMenu(); });
« Last Edit: 02 May 2017, 14:09:44 by texus »

Re: close sub menu on mouse exit
« Reply #2 on: 02 May 2017, 14:23:53 »
Thank you very much, the trick works perfectly!

Re: close sub menu on mouse exit
« Reply #3 on: 04 May 2017, 16:12:01 »
Hello,
just another question regarding menu.
Is it possible to create a multiple submenu levels or just one menu and one submenu?

Something like

File
--New
-----text file
-----image
--Save
--Exit

*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: close sub menu on mouse exit
« Reply #4 on: 04 May 2017, 16:22:04 »
Multiple submenu levels is currently not supported.

Re: close sub menu on mouse exit
« Reply #5 on: 04 May 2017, 16:32:30 »
ok, thank you