我在右键单击事件中启用了一些菜单。第一次效果很好。例如,按下“添加行”菜单,它会添加行。我再次右键单击按钮,它没有显示我在右键单击事件中启用的菜单。我需要一次又一次地添加行。
我怎样才能做到这一点?
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
Try
oForm = SBO_Application.Forms.Item("TRADING")
If (eventInfo.FormUID = "TRADING") Then
oCombo = oForm.Items.Item("1000002").Specific
Dim oMenus As SAPbouiCOM.Menus
oMenus = SBO_Application.Menus
oForm.EnableMenu("1287", True)
oForm.EnableMenu("1292", True)
oForm.EnableMenu("1293", True)
If (oCombo.Selected.Value = "Open") Then
oMenus.Item("1283").Enabled = True
Else
oMenus.Item("1283").Enabled = False
End If
End If
Catch ex As Exception
End Try
End Sub