On MacOS when using the following code in the constructcontextualmenu
Dim submenu As New MenuItem("SubMenu")
submenu.Append(New MenuItem("SubMenu Test 1"))
submenu.Append(New MenuItem("SubMenu Test 2"))
When you click the “Submenu” Item the menu closes.
This is not the case in Finder/Microsoft Word for a menuitem with submenus. If you click it there the menu stays open.
Is there any way to catch the fact that the Submenu was clicked instead of one of the submenu items and prevent the contextual menu from closing?
I tried that, but it didn’t seem to work. The menu still gets closed. I only seem to get into the event after the menu is closed (at least that’s what it looks like).
Mmmhh… here on Windows, it does not close.
I’ve a Submenu created in a ListBox ConstructContextualMenu Event like this:
[code]miTop = New MenuItem( “Telefonie Server Diagnose” )
mi = New MenuItem( “Prüfe ob die Rufnummer auf dem Server existiert” )
mi.Icon = search_16
miTop.append( mi )
mi = New MenuItem( “Freeswitch XML Datei betrachten” )
mi.Icon = search_16
miTop.append( mi )
base.append( miTop )[/code]
When i click on the “Telefonie Server Diagnose” entry, the Menu stays open. In the ContextualMenuAction Event, i have no action for the “Telefonie Server Diagnose” entry.