Supported PlatformsProject Types: Desktop Platforms: OS X, Windows, Linux
- For web applications, see WebButton.
Used for creating a bevel button. A BevelButton can use text, a graphic, a pop-up menu, or several of these interface elements in combination.
A BevelButton can display a graphic, a label (caption), or both.
The first row in a menu has an index of zero.
If the Caption property contains an ampersand character, it will display only if it is preceded by another ampersand character. For example, if you set the Caption property to "Bob & Ray", only "Bob Ray" will display. You need to set it to "Bob && Ray". The ampersand character is used on Windows for keyboard accelerators. This is done to make applications on all platforms behave consistently.
The "No Bevel" option for the Bevel property is functional only for Windows XP and later. The button appears to have no border until the mouse enters the region of BevelButton control. Then the outline of the button appears. On other operating systems, the "No Bevel" option has the same appearance of "Small Bevel."
The following example places an icon in the bevel button, aligns it, and specifies the placement of the caption. The graphic, "databasequery," has been added to the Project Editor.
Me.IconAlign = 6
Me.CaptionAlign = 0
Me.CaptionPlacement = 2
Me.IconDx = 2
Me.IconDy = 1
The following example creates a bevel button menu.
Me.CaptionAlign = 0 //flush left
Me.HasMenu = 2 //menu on right
Dim months() As String = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
For Each m As String In months
The following line of code in the BevelButton's Action event handler sets the BevelButton caption to the value that the user selects: