BevelButton.MenuValue

From Xojo Documentation

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

Supported for all project types and targets.

The number of the menu item the user selects.

Notes

The first menu item is number zero. A separator cannot be selected, but it counts as a menu value.

A checkmark appears next to the selected item in the menu. Set MenuValue = -1 to prevent the checkmark from appearing.

Sample Code

The following code in the Open event of the BevelButton places an icon in the bevel button, aligns it, and specifies the placement of the caption. The graphic, MyPic has been added to the project.

Me.Icon = MyPic
Me.IconAlign = 6
Me.CaptionAlign = 0
Me.CaptionPlacement = 2
Me.IconDx = 2
Me.IconDy = 1

The following code in the Action event of the BevelButton sets the caption to the text of the menu item that the user selects.

Me.Caption = Me.List(Me.MenuValue)