WebPopUpMenu disappears after dialog shown

Hi All,

I face a problem with a WebPopUpMenu that disappears after I open a dialog (initiated by selecting an item in the menu):

In List - Open event:
Listmenu=new WebMenuItem
Listmenu.Append(New WebMenuItem(“Open Dialog”))
List.ContextualMenu = Listmenu

In List - ContextualMenuAction event:
Select Case item.Text
Case “Open Dialog”
Dim Dialog As New MyDialog
Dialog.Show
End Select

Once the dialog is opened and closed, that WebPopUpMenu is not visible anymore.

Any idea?

Thanks

[quote=108640:@■■■■ Van Loo]Hi All,

I face a problem with a WebPopUpMenu that disappears after I open a dialog (initiated by selecting an item in the menu):

In List - Open event:
Listmenu=new WebMenuItem
Listmenu.Append(New WebMenuItem(“Open Dialog”))
List.ContextualMenu = Listmenu

In List - ContextualMenuAction event:
Select Case item.Text
Case “Open Dialog”
Dim Dialog As New MyDialog
Dialog.Show
End Select

Once the dialog is opened and closed, that WebPopUpMenu is not visible anymore.
s[/quote]

You are not referring to a WebPopupMenu at all, but to a Contextual Menu http://documentation.xojo.com/index.php/WebControl.ContextualMenu.

Contextual menus disappear when the user clicks outside of them, or when another control gets the focus, like the dialog. What you report is normal.

If you want a more permanent menu box that looks like a contextual menu, you can create one by assembling for instance WebLabels on top of each other, and manage them according to their MouseEnter, MouseExit and MouseDown event.

Hi Michel,

Thanks for your response.
Indeed it regards a Contextual Menu.

This Contextual Menu is not available anymore once I close a dialog and try to open the menu again with a right click. Previously it worked but I can’t find out what the problem is.

[quote=109560:@■■■■ Van Loo]Hi Michel,
This Contextual Menu is not available anymore once I close a dialog and try to open the menu again with a right click. Previously it worked but I can’t find out what the problem is.[/quote]

You mean after closing the Dialog when you right click the ContextualMenu does not show ?

I have not been able to reproduce that, but you can force the appearance of ContextualMenu in MouseDown with isContextualClick and PresentContextualMenu http://documentation.xojo.com/index.php/WebControl.PresentContextualMenu