BevelButton.HasMenu

From Xojo Documentation

Property (As Integer )
aBevelButton.HasMenu = newIntegerValue
or
IntegerValue = aBevelButton.HasMenu

Supported for all project types and targets.

Controls whether the BevelButton control has a drop-down menu.

Notes

HasMenu can take on the following values.

Value Description
0 No menu
1 Normal menu
2 Menu on right

To prevent a checkmark appearing next to the current menu item, set its MenuValue to -1.

BevelButton1.MenuValue = -1

Sample Code

This code in the Open event handler of a BevelButton adds a menu to it. The first menu item is numbered zero.

Dim months() As String = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
Me.Caption = "Month"
Me.CaptionAlign = 0 // flush left
Me.HasMenu = 2 // menu on right

For Each m As String In months
Me.AddRow(m)
Next

This code in the Action event handler displays the selected menu:

MsgBox(Me.List(Me.MenuValue))