From Xojo Documentation
|This event is only available for Web applications.|
The passed Item on the Choice WebToolbarMenu was was clicked.
In this example, the Menu is named "Menu1". It is populated in the Shown event with the following code. Since there is only one menu on the toolbar, it is not necessary to use the Choice parameter.
Var menu As New WebMenuItem
tbmenu.Menu = menu
The MenuAction event determines which item was selected. The parameter Choice as WebMenuItem is passed in as a parameter. It uses the following code.
MessageBox("Change status to Active.")
MessageBox("Change status to Pending.")
MessageBox("Change status to Disabled.")
If there is more than one menu on the toolbar, you need to handle the Item parameter as well. The example Toolbar project in the Examples folder uses two toolbar menu. They are named ChartsButton and DatesButton. The following example tests the value of Item and reports the value of the selected item on that menu.
LastAction.Text = "You selected " + choice.Text + " from the Charts menu."
LastAction.Text = "You selected " + choice.Text + " from the Dates menu."