BevelButton
From Xojo Documentation
Supported Platforms Project Types: Desktop Platforms: macOS, Windows, Linux |
- For web apps, 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.
Properties | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Methods | |||||||||||
|
Enumerations | ||||||
|
Notes
On macOS, BevelButton is not a native control and does not automatically change its appearance in dark mode. |
A BevelButton can display a graphic, a label (caption), or both.
The "No Bevel" option for the BevelStyle property is functional only on Microsoft Windows. On platforms with cursor, the button appears to have no border until the cursor enters the bounds of the BevelButton control. Then the outline of the button appears. On non-Windows systems, the "No Bevel" option has the same appearance of "Small Bevel."
Sample Code
The following code places an icon in the BevelButton, aligns it, and specifies the position of the caption. The graphic, "DatabaseQueryIcon," has been added to the project.
Me.IconAlignment = BevelButton.IconAlignments.TopLeft
Me.CaptionAlignment = BevelButton.CaptionAlignments.Left
Me.CaptionPosition = BevelButton.CaptionPositions.RightOfIcon
Me.IconDeltaX = 2
Me.IconDeltaY = 1
The following code creates a bevel button menu.
Me.CaptionAlignment = BevelButton.CaptionAlignments.Left
Me.MenuStyle = BevelButton.MenuStyles.Right
Var months() As String = Array("January", "February", "March", "April", "May", "June", _
"July", "August", "September", "October", "November", "December")
For Each m As String In months
Me.Menu.AddMenu(New MenuItem(m))
Next
The following line of code in the BevelButton's MenuSelected event handler sets the BevelButton caption to the value that the user selects:
See Also
ComboBox, PopupMenu, PushButton controls.