### Open a ContextMenu

An example of assigning a ContextMenu to a Button and open.
'Sub to bringup a contextmenu
'Private btnExport As Button
'Private cmExport As ContextMenu
'Private mnuExportCSV1 As MenuItem
'Private mnuExportCSV2 As MenuItem
'Reference: https://docs.oracle.com/javafx/2/api/javafx/scene/control/ContextMenu.html
`Sub btnExport_Action
'Show the contextmenu assigned to the button - to avoid right click the contextmenu is shown when clicking on the button.
'Create the JavaObject which will become a contextmenu
Dim joContextMenu As JavaObject = cmExport
'Call the api method show with parameter RIGHT which shows the contextmenu right from the position given idc 5 and 10.
'Note the positions must be given as double
joContextMenu.RunMethod("show", Array(btnExport, "RIGHT", 5.0, 10.0))
End Sub`
`Sub mnuExportCSV1_Action
Log("mnuExportCSV1_Action")
End Sub`
`Sub mnuExportCSV2_Action
Log("mnuExportCSV2_Action")
End Sub`

Changed: , Category: Menu, File: T6C220M1624.htm, ID: 1624