I'm using Derez menu designer to make a JSON menu. There's a menu to change colors and a few selections. How can I access these JSON selections from code? If one is true I want to set the others to false from code.
In the event sub for the menu I tried to access the menu items by but there's no access to individual items.
Sub MenuBar1_SelectedChange (Selected As Boolean)
If Selected Then
Dim jo As JavaObject = Sender
Dim parent As Menu = jo.RunMethod("getParentMenu", Null) 'will be available in the next update of B4J
For Each mi As MenuItem In parent.MenuItems
If mi Is CheckMenuItem And mi <> Sender Then
Dim cmi As CheckMenuItem = mi
cmi.Selected = False
End If
Next
End If
End Sub
Nice solution it will keep me busy all new years eve. I was hoping for a simpler solution just to access each selection individually even though your code is efficient and great. There's perhaps other ways since it will be available in the next update