Open contextual menu with button

We have:

  • a WebContainer with a ContextualMenu
  • the event ContextualMenuAction

and on that WebContainer there’s

  • a button
  • the button event Action

What i want is to show the forementioned ContextualMenu on the Action event of the button. So when you click the button, you open the containers contextual menu.

Possible?

[quote=87611:@Victor Peters]We have:

  • a WebContainer with a ContextualMenu
  • the event ContextualMenuAction

and on that WebContainer there’s

  • a button
  • the button event Action

What i want is to show the forementioned ContextualMenu on the Action event of the button. So when you click the button, you open the containers contextual menu.

Possible?[/quote]

You may want to look at https://forum.xojo.com/8931-call-contextualmenu-on-touch-devices for a way to emulate the contextual menu.

No. Contextual menus can only be opened by right-clicking on a control, thereby showing the menu that is “in context” for that particular control.

I’m puzzled though. Why do you want to show a “contextual” menu on another control?

Found the answer: self.PresentContextualMenu

The answer to your question on the why, Greg, is not technical but has to do with the users abilities for this project. Not many people use the right mouse button in web apps like they do in desktop apps.