Dim ctxMenu As ContextMenu
ctxMenu.Initialize("")
Dim MT() As String = Array As String("MI1","MI2","MI3")
For i = 0 To MT.Length - 1
Dim Mi As MenuItem
Mi.Initialize(MT(i),"ctxm")
ctxMenu.MenuItems.Add(Mi)
Next
' this line works and context menu is bound with button
' Dim v As B4XView = btnIzpisi
' v.As(JavaObject).RunMethod("setContextMenu",Array(ctxMenu))
' I want to bound context menu with pane or root.view or b4xtable
' HERE IS A ERROR - how can I bound context menu with f.e. b4xTable?! or panel (Pane)
Dim joTable As JavaObject = Root.GetView(0)
joTable.RunMethod("setContextMenu", Array(ctxMenu))