WebPopupMenu.AddRow

From Xojo Documentation

Method

WebPopupMenu.AddRow(value as String)

Supported for all project types and targets.

Adds value to the end of the list of items.


Method

WebPopupMenu.AddRow(item as WebMenuItem)

Supported for all project types and targets.

Adds item to the end of the list of items.

Notes

Passing a WebMenuItem allows the menu item to utilize all of the features of a WebMenuItem including changing the color, disabling the item, using styles, creating hierarchical menus and more.

Sample Code

Add a new rows to the popup menu in the Shown event handler:

Me.AddRow("One")
Me.AddRow("Two")
Me.AddRow("Three")
Me.AddRow("Four")

This example, also in the Shown event handler, adds a item to the WebPopupMenu using a WebMenuItem in order to set the TextColor to blue:

Var item As New WebMenuItem("Police")
item.TextColor = Color.Blue
Me.AddRow(menu)