From Xojo Documentation


BevelButton.AddRow(Text as String)

Supported for all project types and targets.

Adds a row to the bottom of the menu and uses Text as the menu item. The menu items are constructed from a string array. A call to AddRow within a For loop builds the menu.

Sample Code

The following code creates a BevelButton menu.

Dim s As String
Dim last As Integer
s = "January,February,March,April,May,June,July,August,September," _
+ "October,November,December"
last = CountFields(s, ",")
Me.Caption = "Month"
Me.CaptionAlign = 0 // flush left
Me.HasMenu = 2 // menu on right
For i As Integer = 1 To last
Me.AddRow(NthField(s, ",", i))