[Gambas-user] Keeping a menu open?

Bruce Steers bsteers4 at gmail.com
Sat Jan 15 20:52:14 CET 2022


I do not have time to try myself but have you tried Stop Event in the _Hide
event?
something along the lines of this...



*Private bDoNotHide as Boolean*

*Public Sub MyMenu_Show()*


*  bDoNotHide = True*

*End*

*Public Sub MyMenu_Hide()*


*  If bDoNotHide Then  Stop Event*

*End*

*Public Sub MyMenu_Click()*


*  If Last.Name = "mnuCloseMenu" Then bDoNotHide = False*

*End*

Something like that



You can set a normal menu item (mnuCloseMenu) to be the option to close
after selection and make that toggle bDoNotClose

Hope that helps
BruceS


On Sat, 15 Jan 2022 at 19:40, Cristiano Guadagnino <criguada at gmail.com>
wrote:

> Hi,
> I have a program where the user can choose among some items to monitor
> from a menu.
> The program allows you to monitor more than one item at the same time, so
> the menu represents the items as check boxes. But every time you click on
> an item the menu closes, so you have to open it again and select the second
> item, and so on.
> Is it possible to keep the menu open somehow, instead of having it close
> at every click?
>
> Thank you in advance
> Cris
> [image: cloudHQ] <https://www.free-email-tracker.com> Powered by
> cloudHQ <https://www.free-email-tracker.com>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220115/8702119e/attachment.htm>


More information about the User mailing list