My first steps in menus on b4j.
the event mnuitem is raised only in children item: "Item With Unique Event Name"
and not the item with text: "_Google".
Where's my mistake ? Is there a simple full menu example to download and test with events on menu item and sub items ? Thanks in advance
B4X:
[
{Text: "_File", Children:
[
"_New", "_Save",
{Text: "_Export", Children: ["Zip File", "Tar File"]},
"-",
"_Close"
]
},
{Text: "_Google", EventName: "mnuitem", Tag: "Google" ,Children:[] },
{Text: "_Edit", Children:[] },
{Text: "_Help", Children:
[
{Text: "Item With Unique Event Name",
EventName: "mnuitem", Tag: "Unique"},
]
}
]
the event mnuitem is raised only in children item: "Item With Unique Event Name"
and not the item with text: "_Google".
B4X:
Sub MenuBar1_Action
Dim mi As MenuItem = Sender
Log (mi)
If mi.Text = "_Google" Then
WebView1.LoadUrl ("http://www.google.it")
End If
End Sub
Where's my mistake ? Is there a simple full menu example to download and test with events on menu item and sub items ? Thanks in advance