BevelButton.AddRow
From Xojo Documentation
This item was deprecated in version 2019r2. Please use BevelButton.Menu as a replacement. |
Method
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))
Next
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))
Next