Class

# DesktopBevelButton

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used for creating a bevel button. A <span class="title-ref">DesktopBevelButton</span> can use text, a graphic, a pop-up menu, or several of these interface elements in combination.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                          | Type                                                           | Read-Only | Shared |
|---------------------------------------------------------------|----------------------------------------------------------------|-----------|--------|
| `Active<desktopbevelbutton.active>`                           | `Boolean</api/data_types/boolean>`                             | ✓         |        |
| `AllowAutoDeactivate<desktopbevelbutton.allowautodeactivate>` | `Boolean</api/data_types/boolean>`                             |           |        |
| `AllowFocus<desktopbevelbutton.allowfocus>`                   | `Boolean</api/data_types/boolean>`                             |           |        |
| `AllowTabStop<desktopbevelbutton.allowtabstop>`               | `Boolean</api/data_types/boolean>`                             |           |        |
| `BackgroundColor<desktopbevelbutton.backgroundcolor>`         | `ColorGroup</api/graphics/colorgroup>`                         |           |        |
| `BevelStyle<desktopbevelbutton.bevelstyle>`                   | `MenuStyles<desktopbevelbutton.bevelstyles>`                   |           |        |
| `Bold<desktopbevelbutton.bold>`                               | `Boolean</api/data_types/boolean>`                             |           |        |
| `ButtonStyle<desktopbevelbutton.buttonstyle>`                 | `ButtonStyles<desktopbevelbutton.buttonstyles>`                |           |        |
| `Caption<desktopbevelbutton.caption>`                         | `String</api/data_types/string>`                               |           |        |
| `CaptionAlignment<desktopbevelbutton.captionalignment>`       | `CaptionAlignments<desktopbevelbutton.captionalignments>`      |           |        |
| `CaptionDelta<desktopbevelbutton.captiondelta>`               | `Integer</api/data_types/integer>`                             |           |        |
| `CaptionPosition<desktopbevelbutton.captionposition>`         | `CaptionPositions<desktopbevelbutton.captionpositions>`        |           |        |
| `Enabled<desktopbevelbutton.enabled>`                         | `Boolean</api/data_types/boolean>`                             |           |        |
| `FontName<desktopbevelbutton.fontname>`                       | `String</api/data_types/string>`                               |           |        |
| `FontSize<desktopbevelbutton.fontsize>`                       | `Single</api/data_types/single>`                               |           |        |
| `FontUnit<desktopbevelbutton.fontunit>`                       | `FontUnits</api/graphics/fontunits>`                           |           |        |
| `Handle<desktopbevelbutton.handle>`                           | `Ptr</api/data_types/additional_types/ptr>`                    | ✓         |        |
| `HasBackgroundColor<desktopbevelbutton.hasbackgroundcolor>`   | `Boolean</api/data_types/boolean>`                             |           |        |
| `Height<desktopbevelbutton.height>`                           | `Integer</api/data_types/integer>`                             |           |        |
| `Icon<desktopbevelbutton.icon>`                               | `Picture</api/graphics/picture>`                               |           |        |
| `IconAlignment<desktopbevelbutton.iconalignment>`             | `IconAlignments<desktopbevelbutton.iconalignments>`            |           |        |
| `IconDeltaX<desktopbevelbutton.icondeltax>`                   | `Integer</api/data_types/integer>`                             |           |        |
| `IconDeltaY<desktopbevelbutton.icondeltay>`                   | `Integer</api/data_types/integer>`                             |           |        |
| `Index<desktopbevelbutton.index>`                             | `Integer</api/data_types/integer>`                             |           |        |
| `Italic<desktopbevelbutton.italic>`                           | `Boolean</api/data_types/boolean>`                             |           |        |
| `Left<desktopbevelbutton.left>`                               | `Integer</api/data_types/integer>`                             |           |        |
| `LockBottom<desktopbevelbutton.lockbottom>`                   | `Boolean</api/data_types/boolean>`                             |           |        |
| `LockLeft<desktopbevelbutton.lockleft>`                       | `Boolean</api/data_types/boolean>`                             |           |        |
| `LockRight<desktopbevelbutton.lockright>`                     | `Boolean</api/data_types/boolean>`                             |           |        |
| `LockTop<desktopbevelbutton.locktop>`                         | `Boolean</api/data_types/boolean>`                             |           |        |
| `Menu<desktopbevelbutton.menu>`                               | `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>` |           |        |
| `MenuStyle<desktopbevelbutton.menustyle>`                     | `MenuStyles<desktopbevelbutton.menustyles>`                    |           |        |
| `MouseCursor<desktopbevelbutton.mousecursor>`                 | `MouseCursor</api/user_interface/desktop/mousecursor>`         |           |        |
| `Name<desktopbevelbutton.name>`                               | `String</api/data_types/string>`                               | ✓         |        |
| `PanelIndex<desktopbevelbutton.panelindex>`                   | `Integer</api/data_types/integer>`                             |           |        |
| `Parent<desktopbevelbutton.parent>`                           | `Object</api/data_types/additional_types/object>`              |           |        |
| `Scope<desktopbevelbutton.scope>`                             | `Integer</api/data_types/integer>`                             | ✓         |        |
| `TabIndex<desktopbevelbutton.tabindex>`                       | `Integer</api/data_types/integer>`                             |           |        |
| `TextColor<desktopbevelbutton.textcolor>`                     | `ColorGroup</api/graphics/colorgroup>`                         |           |        |
| `Tooltip<desktopbevelbutton.tooltip>`                         | `String</api/data_types/string>`                               |           |        |
| `Top<desktopbevelbutton.top>`                                 | `Integer</api/data_types/integer>`                             |           |        |
| `Transparent<desktopbevelbutton.transparent>`                 | `Boolean</api/data_types/boolean>`                             |           |        |
| `Underline<desktopbevelbutton.underline>`                     | `Boolean</api/data_types/boolean>`                             |           |        |
| `Value<desktopbevelbutton.value>`                             | `Boolean</api/data_types/boolean>`                             |           |        |
| `Visible<desktopbevelbutton.visible>`                         | `Boolean</api/data_types/boolean>`                             |           |        |
| `Width<desktopbevelbutton.width>`                             | `Integer</api/data_types/integer>`                             |           |        |
| `Window<desktopbevelbutton.window>`                           | `DesktopWindow</api/user_interface/desktop/desktopwindow>`     | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                                                    | Parameters                                                                                                                                                                                                                                                    | Returns | Shared |
|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `AcceptFileDrop<desktopbevelbutton.acceptfiledrop>`                                     | type As `String</api/data_types/string>`                                                                                                                                                                                                                      |         |        |
| `AcceptPictureDrop<desktopbevelbutton.acceptpicturedrop>`                               |                                                                                                                                                                                                                                                               |         |        |
| `AcceptRawDataDrop<desktopbevelbutton.acceptrawdatadrop>`                               | type As `String</api/data_types/string>`                                                                                                                                                                                                                      |         |        |
| `AcceptTextDrop<desktopbevelbutton.accepttextdrop>`                                     |                                                                                                                                                                                                                                                               |         |        |
| `AddActionNotificationReceiver<desktopbevelbutton.addactionnotificationreceiver>`       | receiver As `ActionNotificationReceiver</api/language/actionnotificationreceiver>`                                                                                                                                                                            |         |        |
| `Close<desktopbevelbutton.close>`                                                       |                                                                                                                                                                                                                                                               |         |        |
| `DrawInto<desktopbevelbutton.drawinto>`                                                 | g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                                                                                                                                     |         |        |
| `Refresh<desktopbevelbutton.refresh>`                                                   | immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`                                                                                                                                                                              |         |        |
|                                                                                         | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>` |         |        |
| `RemoveActionNotificationReceiver<desktopbevelbutton.removeactionnotificationreceiver>` | receiver As `ActionNotificationReceiver</api/language/actionnotificationreceiver>`                                                                                                                                                                            |         |        |
| `SetFocus<desktopbevelbutton.setfocus>`                                                 |                                                                                                                                                                                                                                                               |         |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                                        | Parameters                                                                                                                                                                            | Returns                            |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `Closing<desktopbevelbutton.closing>`                                       |                                                                                                                                                                                       |                                    |
| `ConstructContextualMenu<desktopbevelbutton.constructcontextualmenu>`       | base As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                              | `Boolean</api/data_types/boolean>` |
| `ContextualMenuItemSelected<desktopbevelbutton.contextualmenuitemselected>` | selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`                                                                                                        | `Boolean</api/data_types/boolean>` |
| `DragEnter<desktopbevelbutton.dragenter>`                                   | obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`                                                                                   | `Boolean</api/data_types/boolean>` |
| `DragExit<desktopbevelbutton.dragexit>`                                     | obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`                                                                                   |                                    |
| `DragOver<desktopbevelbutton.dragover>`                                     | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>` | `Boolean</api/data_types/boolean>` |
| `DropObject<desktopbevelbutton.dropobject>`                                 | obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`                                                                                   |                                    |
| `FocusLost<desktopbevelbutton.focuslost>`                                   |                                                                                                                                                                                       |                                    |
| `FocusReceived<desktopbevelbutton.focusreceived>`                           |                                                                                                                                                                                       |                                    |
| `KeyDown<desktopbevelbutton.keydown>`                                       | key As `String</api/data_types/string>`                                                                                                                                               | `Boolean</api/data_types/boolean>` |
| `KeyUp<desktopbevelbutton.keyup>`                                           | key As `String</api/data_types/string>`                                                                                                                                               |                                    |
| `MenuSelected<desktopbevelbutton.menuselected>`                             | selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`                                                                                                        |                                    |
| `MouseDown<desktopbevelbutton.mousedown>`                                   | X As `Integer</api/data_types/integer>`, Y As `Integer</api/data_types/integer>`                                                                                                      | `Boolean</api/data_types/boolean>` |
| `MouseDrag<desktopbevelbutton.mousedrag>`                                   | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                                                                                                      |                                    |
| `MouseEnter<desktopbevelbutton.mouseenter>`                                 |                                                                                                                                                                                       |                                    |
| `MouseExit<desktopbevelbutton.mouseexit>`                                   |                                                                                                                                                                                       |                                    |
| `MouseMove<desktopbevelbutton.mousemove>`                                   | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                                                                                                      |                                    |
| `MouseUp<desktopbevelbutton.mouseup>`                                       | X As `Integer</api/data_types/integer>`, Y As `Integer</api/data_types/integer>`                                                                                                      |                                    |
| `MouseWheel<desktopbevelbutton.mousewheel>`                                 | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, deltaX As `Integer</api/data_types/integer>`, deltaY As `Integer</api/data_types/integer>`          | `Boolean</api/data_types/boolean>` |
| `Opening<desktopbevelbutton.opening>`                                       |                                                                                                                                                                                       |                                    |
| `Pressed<desktopbevelbutton.pressed>`                                       |                                                                                                                                                                                       |                                    |

## Enumerations

<div id="desktopbevelbutton.bevelstyles">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.BevelStyles

### BevelStyles

> All available bevel styles.
>
> | Value      | Description                |
> |------------|----------------------------|
> | Small      | Small bevel                |
> | Normal     | Normal bevel               |
> | Large      | Large bevel                |
> | Rounded    | Rounded bevel (macOS only) |
> | None       | No Bevel (Windows only)    |
> | Round      | Round (macOS only)         |
> | LargeRound | Large Round (macOS only)   |
> | Disclosure | Disclosure (macOS only)    |

<div id="desktopbevelbutton.buttonstyles">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.ButtonStyles

### ButtonStyles

> All available button styles.
>
> | Value        | Description                                           |
> |--------------|-------------------------------------------------------|
> | PushButton   | Remains in the down position until mouse is released. |
> | ToggleButton | Remains in the down position until clicked again.     |
> | StickyButton | Remains in the down position when clicked.            |

<div id="desktopbevelbutton.captionalignments">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.CaptionAlignments

### CaptionAlignments

> All available caption alignments.
>
> | Value           | Description                     |
> |-----------------|---------------------------------|
> | Left            | Flush left (Default)            |
> | Right           | Flush right                     |
> | SystemDirection | The user's OS-defined direction |
> | Centered        | Center                          |

<div id="desktopbevelbutton.captionpositions">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.CaptionPositions

### CaptionPositions

> All available caption positions.
>
> | Value           | Description                                  |
> |-----------------|----------------------------------------------|
> | SystemDirection | User's OS-defined system direction (Default) |
> | Normal          | Normally                                     |
> | RightOfIcon     | To the right of icon                         |
> | LeftOfIcon      | To the left of the icon                      |
> | BelowIcon       | Below the icon                               |
> | AboveIcon       | Above the icon                               |

<div id="desktopbevelbutton.iconalignments">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.IconAlignments

### IconAlignments

> All available icon alignments.
>
> | Value           | Description                                      |
> |-----------------|--------------------------------------------------|
> | SystemDirection | The user's OS-defined system direction (Default) |
> | Centered        | Center                                           |
> | Left            | Left                                             |
> | Right           | Right                                            |
> | Top             | Top                                              |
> | Bottom          | Bottom                                           |
> | TopLeft         | Top left                                         |
> | BottomLeft      | Bottom left                                      |
> | TopRight        | Top right                                        |
> | BottomRight     | Bottom right                                     |

<div id="desktopbevelbutton.menustyles">

<div class="rst-class">

forsearch

</div>

</div>

DesktopBevelButton.MenuStyles

### MenuStyles

> All available menu styles.
>
> | Value          | Description   |
> |----------------|---------------|
> | None (Default) | No menu       |
> | Down           | Normal menu   |
> | Right          | Menu on right |

## Property descriptions

<div id="desktopbevelbutton.active">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Active

**Active** As `Boolean</api/data_types/boolean>`

> Indicates whether the `control</api/user_interface/desktop/desktopuicontrol>` is active.
>
> This property is read-only.
>
> Active is `False</api/language/false>` when the control's window is not in the foreground. When a `DesktopWindow</api/user_interface/desktop/desktopwindow>` is deactivated, its controls are automatically deactivated unless `AllowAutoDeactivate<desktopuicontrol.allowautodeactivate>` is set to `False</api/language/false>`.

<div id="desktopbevelbutton.allowautodeactivate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AllowAutoDeactivate

**AllowAutoDeactivate** As `Boolean</api/data_types/boolean>`

> Determines whether the control should be deactivated (on macOS) when the parent window is deactivated. The default is `True</api/language/true>`.

<div id="desktopbevelbutton.allowfocus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AllowFocus

**AllowFocus** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the button will be included in the Tab order and can accept the focus. The events `FocusReceived<desktopuicontrol.focusreceived>` and `FocusLost<desktopuicontrol.focuslost>` are called at the appropriate times.
>
> This code enables the AllowFocus property. It is in the Opening event of the control.
>
> ``` xojo
> Me.AllowFocus = True
> ```

<div id="desktopbevelbutton.allowtabstop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AllowTabStop

**AllowTabStop** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control is in the Tab Order and accepts the focus when the user tabs into it. The default is `True</api/language/true>`. If `False</api/language/false>`, the user cannot tab into it to give it the focus. However, the control can gain the focus by other means, such as the user's clicking on it or by setting the focus in code.
>
> This example removes the control from the Tab Order:
>
> ``` xojo
> Me.AllowTabStop = False
> ```

<div id="desktopbevelbutton.backgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.BackgroundColor

**BackgroundColor** As `ColorGroup</api/graphics/colorgroup>`

> The background color for the control. If the control has a HasBackgroundColor property, it must be set to `True</api/language/true>` for the BackgroundColor to be displayed.
>
> This code sets the HasBackgroundColor property and sets the value of the BackgroundColor property:
>
> ``` xojo
> Me.HasBackgroundColor = True
> Me.BackgroundColor = Color.Red
> ```

<div id="desktopbevelbutton.bevelstyle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.BevelStyle

**BevelStyle** As `BevelStyles<desktopbevelbutton.bevelstyles>`

> The bevel style. This property affects the appearance and in some cases the shape of the <span class="title-ref">DesktopBevelButton</span>.
>
> This example sets the Bevel property to Round.
>
> ``` xojo
> Me.BevelStyle = DesktopBevelButton.BevelStyles.Round
> ```

<div id="desktopbevelbutton.bold">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Bold

**Bold** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, applies the bold style to the control's caption and/or its text content if any.
>
> Mac apps can only display font styles that are available. You cannot force a font to display in bold or italic if it does not have bold or italic variations available. In this situation, the Bold property will not affect the font.
>
> This code in any event of a <span class="title-ref">DesktopBevelButton</span> makes the Caption property bold:
>
> ``` xojo
> Me.Bold = True
> ```

<div id="desktopbevelbutton.buttonstyle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.ButtonStyle

**ButtonStyle** As `ButtonStyles<desktopbevelbutton.buttonstyles>`

> The style of the button.
>
> This code changes the button to a "Toggles" button.
>
> ``` xojo
> Me.ButtonStyle = DesktopBevelButton.ButtonStyles.ToggleButton
> ```

<div id="desktopbevelbutton.caption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Caption

**Caption** As `String</api/data_types/string>`

> The caption of a control.
>
> This property can be set inside the IDE or programmatically.
>
> To set an accelerator character, precede the character in the Caption with an ampersand. In order to show an ampersand in the Caption, use two ampersands in a row.
>
> This code sets the caption of the control to "OK".
>
> ``` xojo
> Me.Caption = "OK"
> ```
>
> This code in the Pressed event handler for a <span class="title-ref">DesktopBevelButton</span> changes the text of the button each time it is clicked:
>
> ``` xojo
> If Me.Caption = "Blue" Then
>   Me.Caption = "Red"
> Else
>   Me.Caption = "Blue"
> End If
> ```

<div id="desktopbevelbutton.captionalignment">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.CaptionAlignment

**CaptionAlignment** As `CaptionAlignments<desktopbevelbutton.captionalignments>`

> The alignment of the caption.
>
> The following code sets the alignment to right. It is in the Opening event of the control.
>
> ``` xojo
> Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Right
> ```

<div id="desktopbevelbutton.captiondelta">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.CaptionDelta

**CaptionDelta** As `Integer</api/data_types/integer>`

> The distance (in pixels) of the caption from the left of the button.
>
> The following example moves the caption 10 pixels from the left.
>
> ``` xojo
> Me.Caption = "Caption"
> Me.CaptionAlign = 0 ' left
> Me.CaptionDelta = 10
> ```

<div id="desktopbevelbutton.captionposition">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.CaptionPosition

**CaptionPosition** As `CaptionPositions<desktopbevelbutton.captionpositions>`

> The position of the caption relative to the icon.
>
> This code positions the caption to the right of the icon. The image, "Woof", is an image that has been added to the project.
>
> ``` xojo
> Me.Caption = "Fido"
> Me.CaptionAlignment = BevelButton.CaptionAlignments.Left
> Me.CaptionDelta = 10
> Me.Icon = Woof
> Me.CaptionPosition = BevelButton.CaptionPositions.RightOfIcon
> ```

<div id="desktopbevelbutton.enabled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

> Determines if the control should be enabled when the owning window is opened.
>
> A disabled control cannot be clicked and cannot receive the focus.
>
> This example disables the control.
>
> ``` xojo
> Me.Enabled = False
> ```

<div id="desktopbevelbutton.fontname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.FontName

**FontName** As `String</api/data_types/string>`

> Name of the font used to display the caption.
>
> You can enter any installed font or the names of the two metafonts, "System" and "SmallSystem".
>
> The System font is the font used by the system software as its default font. Different operating systems use different default fonts. If the system software supports both a large and small System font, you can also specify the "SmallSystem" font as your FontName.
>
> On macOS, "SmallSystem" specifies the smaller system font and may make the control smaller in size as well. On Windows and Linux, "SmallSystem" is the same as "System".
>
> This code (in any <span class="title-ref">DesktopBevelButton</span> event) sets the FontName property.
>
> ``` xojo
> Me.FontName = "Helvetica"
> ```

<div id="desktopbevelbutton.fontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.FontSize

**FontSize** As `Single</api/data_types/single>`

> Point size of the font used to display the caption.
>
> If you enter zero as the FontSize, your app will use the font size that works best for the platform on which it is running.
>
> This code (in any <span class="title-ref">DesktopBevelButton</span> event) sets the font size to 16 points.
>
> ``` xojo
> Me.FontUnit = FontUnits.Point
> Me.FontSize = 16
> ```

<div id="desktopbevelbutton.fontunit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.FontUnit

**FontUnit** As `FontUnits</api/graphics/fontunits>`

> The units in which Font size is measured.

<div id="desktopbevelbutton.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

> Returns a handle to the control.
>
> This property is read-only.
>
> For interfacing with Mac APIs using `Declares</api/language/declare>`, **DesktopControl.Handle** returns NSViews (except for `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`).
>
> On Windows returns the HWND of the control.
>
> On Linux it returns a GtkWidget.
>
> The following gets a handle to the control.
>
> ``` xojo
> Var p As Ptr = Me.Handle
> ```

<div id="desktopbevelbutton.hasbackgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.HasBackgroundColor

**HasBackgroundColor** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the `BackgroundColor<desktopbevelbutton.backgroundcolor>` color will be visible. The `BackgroundColor<desktopbevelbutton.backgroundcolor>` is visible only on Windows and Linux.
>
> The following code sets the `BackgroundColor<desktopbevelbutton.backgroundcolor>`.
>
> ``` xojo
> Me.HasBackgroundColor = True
> Me.BackgroundColor = Color.Red
> ```

<div id="desktopbevelbutton.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Height

**Height** As `Integer</api/data_types/integer>`

> The height (in points) of the control.
>
> This example sets the height of the control to 100:
>
> ``` xojo
> Me.Height = 100
> ```

<div id="desktopbevelbutton.icon">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Icon

**Icon** As `Picture</api/graphics/picture>`

> The name of the graphic to use as the icon.
>
> Drag the graphic to the Project Editor or import it using File \> Import. Icon supports pictures from any source, including those created at runtime with the `Picture</api/graphics/picture>` constructor. It also supports transparency, either by setting the Transparent property of the `Picture</api/graphics/picture>` to 1 or via the `Picture</api/graphics/picture>`'s Mask.
>
> The following code places an icon in the <span class="title-ref">DesktopBevelButton</span>, aligns it, and specifies the placement of the caption. The image, "DatabaseQuery," has been added to the project.
>
> ``` xojo
> Me.Icon = DatabaseQuery
> Me.IconAlign = 6
> Me.CaptionAlign = 0
> Me.CaptionPlacement = 2
> Me.IconDX = 2
> Me.IconDY = 1
> ```

<div id="desktopbevelbutton.iconalignment">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.IconAlignment

**IconAlignment** As `IconAlignments<desktopbevelbutton.iconalignments>`

> The alignment of the Icon within the <span class="title-ref">DesktopBevelButton</span>.
>
> The following code places an icon in the <span class="title-ref">DesktopBevelButton</span>, aligns it, and specifies the position of the caption. The graphic, "DatabaseQueryIcon," has been added to the project.
>
> ``` xojo
> Me.Icon = DatabaseQueryIcon
> Me.IconAlignment = DesktopBevelButton.IconAlignments.TopLeft
> Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
> Me.CaptionPosition = DesktopBevelButton.CaptionPositions.RightOfIcon
> Me.IconDeltaX = 2
> Me.IconDeltaY = 1
> ```

<div id="desktopbevelbutton.icondeltax">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.IconDeltaX

**IconDeltaX** As `Integer</api/data_types/integer>`

> The distance (in points) from left or right, depending on alignment. If center alignment is chosen, IconDeltaX does nothing.
>
> The following code places an icon in the <span class="title-ref">DesktopBevelButton</span>, aligns it, and specifies the position of the caption. The graphic, "DatabaseQueryIcon," has been added to the project.
>
> ``` xojo
> Me.Icon = DatabaseQueryIcon
> Me.IconAlignment = DesktopBevelButton.IconAlignments.TopLeft
> Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
> Me.CaptionPosition = DesktopBevelButton.CaptionPositions.RightOfIcon
> Me.IconDeltaX = 2
> Me.IconDeltaY = 1
> ```

<div id="desktopbevelbutton.icondeltay">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.IconDeltaY

**IconDeltaY** As `Integer</api/data_types/integer>`

> The distance (in points) from top or bottom, depending on alignment. If center alignment is chosen, IconDeltaY does nothing.
>
> The following code places an icon in the <span class="title-ref">DesktopBevelButton</span>, aligns it, and specifies the position of the caption. The graphic, "DatabaseQueryIcon," has been added to the project.
>
> ``` xojo
> Me.Icon = DatabaseQueryIcon
> Me.IconAlignment = DesktopBevelButton.IconAlignments.TopLeft
> Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
> Me.CaptionPosition = DesktopBevelButton.CaptionPositions.RightOfIcon
> Me.IconDeltaX = 2
> Me.IconDeltaY = 1
> ```

<div id="desktopbevelbutton.index">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Index

**Index** As `Integer</api/data_types/integer>`

> If the control is used in a control set, this specifies the control's index in the set.

<div id="desktopbevelbutton.italic">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Italic

**Italic** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, applies the italic style to the control's caption and/or its text content if any.
>
> Mac apps can only display font styles that are available. You cannot force a font to display in bold or italic if it does not have bold or italic variations available. In this situation, the Italic property will not affect the font.
>
> This code in any event of a <span class="title-ref">DesktopBevelButton</span> makes italic the Caption property:
>
> ``` xojo
> Me.Italic = True
> ```

<div id="desktopbevelbutton.left">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Left

**Left** As `Integer</api/data_types/integer>`

> The distance from the left side of the control to the left side of its containing window or container.
>
> The following example moves the control 100 points from the left side of the window:
>
> ``` xojo
> Me.Left = 150
> ```

<div id="desktopbevelbutton.lockbottom">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.LockBottom

**LockBottom** As `Boolean</api/data_types/boolean>`

> Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning window.
>
> This property can be set in the control's Inspector. The following example sets it in code.
>
> ``` xojo
> Me.LockBottom = True
> ```

<div id="desktopbevelbutton.lockleft">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.LockLeft

**LockLeft** As `Boolean</api/data_types/boolean>`

> Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning window.
>
> LockLeft and Locktop default to `True</api/language/true>` when you add a new control to a window. Existing controls will be altered only if LockRight and/or LockBottom are not set. *LockLeft* has no effect unless *LockRight* is `True</api/language/true>`.
>
> This property can be set in the control's Inspector. The following example sets it in code.
>
> ``` xojo
> Me.LockLeft = True
> ```

<div id="desktopbevelbutton.lockright">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.LockRight

**LockRight** As `Boolean</api/data_types/boolean>`

> Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning window.
>
> This property can be set in the control's Inspector. The following example sets it in code.
>
> ``` xojo
> Me.LockRight = True
> ```

<div id="desktopbevelbutton.locktop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.LockTop

**LockTop** As `Boolean</api/data_types/boolean>`

> Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning window.
>
> LockTop and LockLeft default to `True</api/language/true>` when you add a control to a window. Existing controls will be altered only if LockRight and/or LockBottom are not set. *LockTop* has no effect unless *LockBottom* is `True</api/language/true>`.
>
> This property can be set in the control's Inspector. The following example sets it in code.
>
> ``` xojo
> Me.LockTop = True
> ```

<div id="desktopbevelbutton.menu">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Menu

**Menu** As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`

> The button's drop-down menu.
>
> This code in the Opening event handler of a <span class="title-ref">DesktopBevelButton</span> adds a menu to it. The first menu item is numbered zero.
>
> ``` xojo
> Var months() As String = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
> Me.Caption = "Month"
> Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
> Me.MenuStyle = DesktopBevelButton.MenuStyles.Right
>
> Var myMenu As New DesktopMenuItem
> For Each m As String In months
>   myMenu.AddMenu(New DesktopMenuItem(m))
> Next
>
> Me.Menu = myMenu
> ```
>
> This code in the MenuSelected event handler displays the selected menu:
>
> ``` xojo
> MessageBox(selectedItem.Text)
> ```

<div id="desktopbevelbutton.menustyle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MenuStyle

**MenuStyle** As `MenuStyles<desktopbevelbutton.menustyles>`

> The style of the button's menu.
>
> The following code sets the style of the button's menu to Down.
>
> ``` xojo
> Me.MenuStyle = DesktopBevelButton.MenuStyles.Down
> ```

<div id="desktopbevelbutton.mousecursor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseCursor

**MouseCursor** As `MouseCursor</api/user_interface/desktop/mousecursor>`

> The cursor to be displayed while the mouse is within the control and both the `DesktopApplication</api/user_interface/desktop/desktopapplication>` and `DesktopWindow</api/user_interface/desktop/desktopwindow>` class's MouseCursor properties are `Nil</api/language/nil>`.
>
> If the `DesktopApplication</api/user_interface/desktop/desktopapplication>` class's MouseCursor property is not `Nil</api/language/nil>` or the `DesktopWindow</api/user_interface/desktop/desktopwindow>`'s MouseCursor property is not `Nil</api/language/nil>`, then any control's MouseCursor property is ignored. You can use a cursor stored in the `Cursors</api/user_interface/desktop/cursors>` module. On macOS, you can also obtain a `MouseCursor</api/user_interface/desktop/mousecursor>` from a resource file.
>
> This line in the Opening event of the control sets the default cursor to the finger pointer.
>
> ``` xojo
> Me.MouseCursor = System.Cursors.FingerPointer
> ```

<div id="desktopbevelbutton.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Name

**Name** As `String</api/data_types/string>`

> The name of the control. Set the name of the control in the Inspector.
>
> This property is read-only.

<div id="desktopbevelbutton.panelindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.PanelIndex

**PanelIndex** As `Integer</api/data_types/integer>`

> If the control has been placed on a `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>` or `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.
>
> The first panel is numbered zero. If the control has been placed on a panel of a `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>` or `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` control, it returns the panel number. If the control is not on a `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` or `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>`, it returns -1. If you change the PanelIndex to a nonexistent panel, the control will disappear until you give it a PanelIndex value that corresponds to a panel that exists.
>
> If you are looking to change the currently selected panel (page/tab), use `DesktopPagePanel<desktoppagepanel.selectedpanelindex>`.
>
> This code displays the panel index of the control that is on the page.
>
> ``` xojo
> MessageBox(Me.SelectedPanelIndex.ToString)
> ```

<div id="desktopbevelbutton.parent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Parent

**Parent** As `Object</api/data_types/additional_types/object>`

> Used to get and set the control's parent control or window.
>
> If the control is on the window, the Parent will be the `Window</api/user_interface/desktop/desktopwindow>`. If the control is on the container, the Parent will be the `container</api/user_interface/desktop/desktopcontainer>`. If the control is completed enclosed by another control, the Parent will be that `control</api/user_interface/desktop/desktopuicontrol>`.
>
> If you do not want the enclosing control to be the parent, set the Parent property of that control to `Nil</api/language/nil>` to make it the `Window</api/user_interface/desktop/desktopwindow>`.
>
> If the parent control is somehow in another window, an `InvalidParentException</api/exceptions/invalidparentexception>` will occur.
>
> The following example sets the parent of the control to the window.
>
> ``` xojo
> Me.Parent = Nil
> ```

<div id="desktopbevelbutton.scope">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Scope

**Scope** As `Integer</api/data_types/integer>`

> Used to determine whether access to the control is Public (0) or Private (2). The default is Public.
>
> This property is read-only.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This is a designtime-only property and thus can only be set in the Inspector and is not accessible via code.
>
> </div>
>
> If the Scope of a control is set to Private, it cannot be accessed from outside its parent window.

<div id="desktopbevelbutton.tabindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.TabIndex

**TabIndex** As `Integer</api/data_types/integer>`

> The control's position in the Tab Order. The control with whose TabIndex is 0 will get the focus first.
>
> On macOS, only controls where you enter data from the keyboard typically get the focus. In order to manually set focus to controls that don't allow keyboard entry, go to System Preferences, click on the Keyboard icon then on the Shortcuts tab and then check the *Use keyboard navigation to move focus between controls* checkbox.
>
> This example sets the control's TabIndex.
>
> ``` xojo
> Me.TabIndex = 2
> ```

<div id="desktopbevelbutton.textcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.TextColor

**TextColor** As `ColorGroup</api/graphics/colorgroup>`

> Gets or sets the color of the caption or the text content. The default value is black.
>
> The following example sets the TextColor to red.
>
> ``` xojo
> Me.TextColor = Color.Red
> ```

<div id="desktopbevelbutton.tooltip">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Tooltip

**Tooltip** As `String</api/data_types/string>`

> Text of help message displayed as a Windows or Linux "tooltip" or macOS help tag.
>
> The tip/tag is displayed when the user hovers the mouse cursor over the control.
>
> This example adds a tooltip to a control:
>
> ``` xojo
> Me.Tooltip = "Click to bark."
> ```

<div id="desktopbevelbutton.top">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Top

**Top** As `Integer</api/data_types/integer>`

> The distance from the top of the control to the top of its containing window or container.
>
> This example sets the top of the control to 140 points from the top of the window:
>
> ``` xojo
> Me.Top = 140
> ```

<div id="desktopbevelbutton.transparent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Transparent

**Transparent** As `Boolean</api/data_types/boolean>`

> Determines whether the control is transparent on Windows. The default is `False</api/language/false>`. Has no effect on macOS or Linux.
>
> Transparent controls draw more slowly and use more memory in order to cache the background. Unless you absolutely require transparency, leave this set to `False</api/language/false>`.
>
> For projects that were created prior to 2018r1, this property defaults to `True</api/language/true>` to emulate previous behavior. Consider changing it to `False</api/language/false>` to improve performance if you do not require transparency.

<div id="desktopbevelbutton.underline">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Underline

**Underline** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, applies the underline style to the control's caption and/or its text content if any.
>
> This code underlines the control's text or caption property.
>
> ``` xojo
> Me.Underline = True
> ```
>
> This code in any event of a <span class="title-ref">DesktopBevelButton</span> underlines the Caption property:
>
> ``` xojo
> Me.Underline = True
> Me.Caption = "underlined"
> ```

<div id="desktopbevelbutton.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Value

**Value** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the button appears depressed.
>
> This code is in the Pressed event of a `DesktopCheckBox</api/user_interface/desktop/desktopcheckbox>`. It toggles the state of the <span class="title-ref">DesktopBevelButton</span> depending on whether the DesktopCheckBox was checked.
>
> ``` xojo
> If Me.Value Then
> BevelButton1.Value = True
> Else
> BevelButton1.Value = False
> End If
> ```

<div id="desktopbevelbutton.visible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Visible

**Visible** As `Boolean</api/data_types/boolean>`

> Determines whether the control is visible when its owning window is opened. The default is `True</api/language/true>`: the control is visible.
>
> The following code makes the control invisible:
>
> ``` xojo
> Me.Visible = False
> ```

<div id="desktopbevelbutton.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Width

**Width** As `Integer</api/data_types/integer>`

> The width (in points) of the control.
>
> The following example resizes the control:
>
> ``` xojo
> Me.Width = 200
> ```

<div id="desktopbevelbutton.window">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Window

**Window** As `DesktopWindow</api/user_interface/desktop/desktopwindow>`

> The control's parent window.
>
> This property is read-only.
>
> This code gets the parent window's Title property.
>
> ``` xojo
> MessageBox(Me.Window.Title)
> ```

## Method descriptions

<div id="desktopbevelbutton.acceptfiledrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AcceptFileDrop

**AcceptFileDrop**(type As `String</api/data_types/string>`)

> Permits documents of *type* to be dropped on the control. *type* must be a file type that you defined in via the `FileType</api/files/filetype>` class or the File Type Sets Editor.
>
> This code in the Opening event makes it possible for the user to drop either a picture or a file that is a jpeg image. The File Type Sets editor was used to define the “image/jpeg” file type. It is one of the “Common File Types” that is available in the editor.
>
> ``` xojo
> Me.AcceptPictureDrop
> Me.AcceptFileDrop("image/jpeg")
> ```
>
> To restrict file drops to specific file types on macOS, in addition to creating a File Type (as a `project item</getting_started/using_the_ide/file_type_group_editor>` or `via code</api/files/filetype>`) to define the file extension, you must also use the `DragEnter<desktopuicontrol.dragenter>` event:
>
> For example, to restrict drops to folders only:
>
> ``` xojo
> If Not obj.FolderItem.IsFolder Then Return True
> ```
>
> To restrict drops to a files with a specific extension:
>
> ``` xojo
> If Not obj.FolderItem.Extension <> ".my_extension" Then Return True
> ```

<div id="desktopbevelbutton.acceptpicturedrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AcceptPictureDrop

**AcceptPictureDrop**

> Permits pictures to be dropped on the control.
>
> If a control should accept pictures in a drag and drop, then AcceptPictureDrop needs to be called prior to the drop. Typically, it is in the Opening event of the control itself. For example, the line:
>
> ``` xojo
> Me.AcceptPictureDrop
> ```
>
> in the Opening event of the control that will receive the dragged pictures is needed. When the picture is dropped, the `DropObject<desktopuicontrol.dropobject>` event is called and this is where you will put your code to handle the drop.
>
> Opening Event:
>
> ``` xojo
> Me.AcceptPictureDrop
> ```
>
> DropObject Event:
>
> ``` xojo
> If obj.PictureAvailable Then
>   Me.Backdrop = obj.Picture
> End If
> ```

<div id="desktopbevelbutton.acceptrawdatadrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AcceptRawDataDrop

**AcceptRawDataDrop**(type As `String</api/data_types/string>`)

> Permits data (of the *type* specified) to be dropped on the control.
>
> The following specfies a generic file type defined in the File Type Sets editor.
>
> ``` xojo
> Me.AcceptRawDataDrop("????")
> ```

<div id="desktopbevelbutton.accepttextdrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AcceptTextDrop

**AcceptTextDrop**

> Permits text to be dropped on the control.
>
> This line in the Opening event of a control that can accept dragged text.
>
> ``` xojo
> Me.AcceptTextDrop
> ```

<div id="desktopbevelbutton.addactionnotificationreceiver">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.AddActionNotificationReceiver

**AddActionNotificationReceiver**(receiver As `ActionNotificationReceiver</api/language/actionnotificationreceiver>`)

> Registers an `ActionNotificationReceiver</api/language/actionnotificationreceiver>`.

<div id="desktopbevelbutton.close">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Close

**Close**

> Closes a control.
>
> Closing a control permanently removes the control from memory, making it impossible to access. You can close both non-indexed controls and indexed controls. When you close an indexed control, the indexes for the remaining controls will shift downward so that the indexes start with zero and are consecutive.
>
> The following code closes the control. When this is executed from a visible control, the control disappears from the window.
>
> ``` xojo
> Me.Close
> ```

<div id="desktopbevelbutton.drawinto">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.DrawInto

**DrawInto**(g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`)

> Draws the contents of the control into the specified `Graphics</api/graphics/graphics>` context. The parameters *x* and *y* are the coordinates of the top, left corner.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> DrawInto will only work if the control is on a window or container.
>
> </div>
>
> This example draws the current control into the Graphics of a Picture and then displays it as the Backdrop of a Canvas:
>
> ``` xojo
> Var p As New Picture(Me.Width, Me.Height)
> Me.DrawInto(p.Graphics, 0, 0)
> Canvas1.Backdrop = p
> ```

<div id="desktopbevelbutton.refresh">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Refresh

**Refresh**(immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Redraws the portion specified of the contents of the control the next time the OS redraws the control or immediately if `True</api/language/true>` is passed.
>
> If you are calling this so frequently that you experience a slowdown in your code, pass `True</api/language/true>` for the immediately parameter.
>
> Calling this method causes the Render event to fire.
>
> Refresh the entire area immediately:
>
> ``` xojo
> Me.Refresh(True)
> ```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Refresh

**Refresh**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Redraws the portion specified of the contents of the control the next time the OS redraws the control or immediately if `True</api/language/true>` is passed.
>
> Refresh a portion of the area the next time the OS redraws the control:
>
> ``` xojo
> Me.Refresh(100, 150, 200, 300)
> ```

<div id="desktopbevelbutton.removeactionnotificationreceiver">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.RemoveActionNotificationReceiver

**RemoveActionNotificationReceiver**(receiver As `ActionNotificationReceiver</api/language/actionnotificationreceiver>`)

> Unregisters an ActionNotificationReceiver.

<div id="desktopbevelbutton.setfocus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.SetFocus

**SetFocus**

> If applicable, sets the focus to the DesktopUIControl. KeyDown events are directed to the control.
>
> If the control cannot get the focus on the platform on which the application is running, SetFocus does nothing. The SetFocus method of the `DesktopWindow</api/user_interface/desktop/desktopwindow>` class or the `ClearFocus</api/user_interface/desktop/clearfocus>` method can be used to remove the focus from the control that currently has the focus, leaving no control with the focus.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On macOS, you need Full Keyboard Access turned on in System Preferences (Keyboard-\>Shortcuts) in order to manually set focus to non-text controls.
>
> </div>
>
> The following example in the Opening event sets the focus to the that control. If another control has the focus when this line is executed, then the user sees this control gets the focus.
>
> ``` xojo
> Me.SetFocus
> ```

## Event descriptions

<div id="desktopbevelbutton.closing">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Closing

**Closing**

> The control is closing.

<div id="desktopbevelbutton.constructcontextualmenu">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.ConstructContextualMenu

**ConstructContextualMenu**(base As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> This event is called when it is appropriate to display a contextual menu for the control.
>
> This event handler is the recommended way to handle contextual menus because this event figures out whether the user has requested the contextual menu, regardless of how they did it. Depending on platform, it might be in the `MouseUp<desktopuicontrol.mouseup>` or `MouseDown<desktopuicontrol.mousedown>` event and it might be a right+click or by pressing the contextual menu key on the keyboard, for example.
>
> *base* is analogous to the menu bar for the contextual menu. Any items you add to *base* will be shown as menu items. If you return `False</api/language/false>`, the event is passed up the parent hierarchy.
>
> If you return `True</api/language/true>`, the contextual menu is displayed. The parameters *x* and *y* are the mouse locations. If the event was fired because of a non-mouse event, then *x* and *y* are both set to -1. See the example of a contextual menu in the following section.
>
> The following ConstructContextualMenu event handler builds a menu with three menu items plus a submenu with three additional menu items.
>
> ``` xojo
> ' Add some items
> base.AddMenu(New DesktopMenuItem("Test 1"))
> base.AddMenu(New DesktopMenuItem("Test 2"))
> base.AddMenu(New DesktopMenuItem("Test 3"))
>
> ' Add a Separator
> base.AddMenu(New DesktopMenuItem(DesktopMenuItem.TextSeparator))
>
> ' Add a sub menu
> Var submenu As New DesktopMenuItem("SubMenu")
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 1"))
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 2"))
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 3"))
> base.AddMenu(submenu)
>
> ' Add a Separator
> base.AddMenu(New DesktopMenuItem(DesktopMenuItem.TextSeparator))
>
> Return True
> ```

<div id="desktopbevelbutton.contextualmenuitemselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.ContextualMenuItemSelected

**ContextualMenuItemSelected**(selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`) As `Boolean</api/data_types/boolean>`

> Fires when a contextual menuitem *selectedItem* was selected but the `MenuItemSelected<desktopmenuitem.menuitemselected>` event and the MenuHandler for the `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>` did not handle the menu selection.
>
> This event gives you a chance to handle the menu selection by inspecting the menuitem's Text or Tag properties to see which item was selected. Use this in conjunction with ConstructContextualMenu if you have not specified the `MenuItemSelected<desktopmenuitem.menuitemselected>` event or the Menu Handler for the items on the contextual menu. See the example of a contextual menu in the examples for the **DesktopUIControl** class.
>
> `Return</api/language/return>` `True</api/language/true>` if this event has handled the item the user chose from the contextual menu. Returning `False</api/language/false>` will cause the control's parent to execute its ContextualMenuItemSelected event. This can be handy if you have the same contextual menu for several controls who share the same `Parent<desktopuicontrol.parent>` (several on the same window for example). By returning `False</api/language/false>` you can handle them all in a single event.
>
> This simple event handler displays the value of the selected menu item.
>
> ``` xojo
> If selectedItem <> Nil Then MessageBox(selectedItem.Text)
> Return True
> ```

<div id="desktopbevelbutton.dragenter">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.DragEnter

**DragEnter**(obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`) As `Boolean</api/data_types/boolean>`

> Fires when the passed `DragItem</api/user_interface/desktop/dragitem>` enters the DesktopUIControl.
>
> Returns a `Boolean</api/data_types/boolean>`. Return `True</api/language/true>` from this event to prevent the drop from occurring.
>
> The Action parameter specifies the type of drag action.
>
> To restrict file drops to just folders (and not files), you can put this code in the DragEnter event:
>
> ``` xojo
> If Not obj.FolderItem.IsFolder Then Return True
> ```

<div id="desktopbevelbutton.dragexit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.DragExit

**DragExit**(obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`)

> Fires when the passed `DragItem</api/user_interface/desktop/dragitem>` exits the DesktopUIControl.
>
> The *obj* parameter is the item being dragged. The *action* parameter specifies the type of drag action.

<div id="desktopbevelbutton.dragover">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.DragOver

**DragOver**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`) As `Boolean</api/data_types/boolean>`

> Fires when the `DragItem</api/user_interface/desktop/dragitem>` is over the DesktopUIControl.
>
> The *obj* parameter is the object being dragged. The coordinates x and y are relative to the **DesktopUIControl**. Returns a `Boolean</api/data_types/boolean>`. Return `True</api/language/true>` from this event to prevent the drop from occurring.
>
> The *Action* parameter specifies the type of drag action, which is typically done by holding down a modifier key (Shift, Alt, Option, Command, etc.) while doing the drag.

<div id="desktopbevelbutton.dropobject">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.DropObject

**DropObject**(obj As `DragItem</api/user_interface/desktop/dragitem>`, action As `DragItem.Types<dragitem.types>`)

> The item represented by *obj* has been dropped on the control.
>
> The *obj* parameter is the object being dragged. The *action* parameter specifies the type of drag action.
>
> The following DropObject event handler can handle either a dropped picture or a dropped file. The type of file that it can handle needs to have been specified in a call to AcceptFileDrop prior to the drop, for example, in the Opening event.
>
> ``` xojo
> If Obj.PictureAvailable Then
> Me.Image = obj.Picture
> ElseIf Obj.FolderItemAvailable Then
> Me.Image = Picture.Open(obj.FolderItem)
> End If
> ```

<div id="desktopbevelbutton.focuslost">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.FocusLost

**FocusLost**

> The `control</api/user_interface/desktop/desktopuicontrol>` has lost the focus.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On macOS, controls other than text fields and lists will accept and lose focus only if the full keyboard access option is enabled in System Preferences/Keyboard.
>
> </div>

<div id="desktopbevelbutton.focusreceived">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.FocusReceived

**FocusReceived**

> The `control</api/user_interface/desktop/desktopuicontrol>` has received the focus and has a selection rectangle around it.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On macOS, controls other than text fields and lists will accept focus only if the full keyboard access option is enabled in System Preferences/Keyboard.
>
> </div>

<div id="desktopbevelbutton.keydown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.KeyDown

**KeyDown**(key As `String</api/data_types/string>`) As `Boolean</api/data_types/boolean>`

> The user has pressed the *key* passed while the `control</api/user_interface/desktop/desktopuicontrol>` has the focus.
>
> Returning `True</api/language/true>` prevents the KeyDown event on the parent control (usually the window) from executing. Returning `False</api/language/false>` results in the execution of the KeyDown event of the parent control.

<div id="desktopbevelbutton.keyup">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.KeyUp

**KeyUp**(key As `String</api/data_types/string>`)

> Fires when the passed *key* is released in the control that has the focus.
>
> It is not guaranteed to be the same key that received the KeyDown event.

<div id="desktopbevelbutton.menuselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MenuSelected

**MenuSelected**(selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`)

> The user has selected a menu item from the button's menu.

<div id="desktopbevelbutton.mousedown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseDown

**MouseDown**(X As `Integer</api/data_types/integer>`, Y As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> The mouse button was pressed inside the control's region at the location passed in to *x*, *y*.
>
> This event fires repeatedly while the mouse button is being held down.
>
> The coordinates *x* and *y* are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner of the `control</api/user_interface/desktop/desktopuicontrol>`.
>
> `Return</api/language/return>` `True</api/language/true>` if you are going to handle the MouseDown. In such a case:
>
> - The Pressed event, if any, will not execute and the state of the object will not change.
> - You will receive the `MouseUp<desktopuicontrol.mouseup>` event.
>
> If you return False, the system handles the MouseDown so the `MouseUp<desktopuicontrol.mouseup>` event handler does not get called.
>
> The MouseDown event uses the `DragItem</api/user_interface/desktop/dragitem>` constructor when the user drags the contents of the control. It is:
>
> ``` xojo
> Var d As DragItem
> d = New DragItem(Self, Me.Left, Me.Top, Me.Width, Me.Height)
> d.Picture = Me.Image
> d.Drag ' Allow the drag
> ```

<div id="desktopbevelbutton.mousedrag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseDrag

**MouseDrag**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`)

> The mouse button was pressed inside the control and moved (dragged) at the location local to the control passed in to *x*, *y*.
>
> This event fires repeatedly while the mouse button is down regardless of whether or not the mouse coordinates are changing.
>
> This event will not occur unless you return `True</api/language/true>` in the MouseDown event.

<div id="desktopbevelbutton.mouseenter">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseEnter

**MouseEnter**

> The mouse has entered the area of the control.

<div id="desktopbevelbutton.mouseexit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseExit

**MouseExit**

> The mouse has left the area of the control.

<div id="desktopbevelbutton.mousemove">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseMove

**MouseMove**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`)

> The mouse has moved within the control to the coordinates passed. The coordinates are local to the control, not to the window.

<div id="desktopbevelbutton.mouseup">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseUp

**MouseUp**(X As `Integer</api/data_types/integer>`, Y As `Integer</api/data_types/integer>`)

> The mouse button was released. Use the *x* and *y* parameters to determine if the mouse button was released within the control's boundaries.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This event will not occur unless you return `True</api/language/true>` in the MouseDown event.
>
> </div>
>
> The parameters *x* and *y* are local coordinates, i.e. they represent the position of the mouse click relative to the upper-left corner of the `control</api/user_interface/desktop/desktopuicontrol>`. Mouse clicks that are released to the left or above a control are negative.

<div id="desktopbevelbutton.mousewheel">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.MouseWheel

**MouseWheel**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, deltaX As `Integer</api/data_types/integer>`, deltaY As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> The mouse wheel has been moved.
>
> The parameters *x* and *y* are the mouse coordinates relative to the control that has received the event. The parameters *deltaX* and *deltaY* hold the number of scroll lines the wheel has been moved horizontally and vertically, as defined by the operating system. *deltaX* is positive when the user scrolls right and negative when scrolling to the left. *deltaY* is positive when the user scrolls down and negative when scrolling up.
>
> Returns a `Boolean</api/data_types/boolean>`. Return `True</api/language/true>` to prevent the event from propagating further.

<div id="desktopbevelbutton.opening">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Opening

**Opening**

> The control is about to be displayed. Use this event to initialize a control.
>
> The Opening event is called after the Constructor.
>
> Be warned that initializing control property values using the Constructor instead of the Opening event may result in those property values being overwritten by what is set in the Inspector. For best results, use the Opening event for control initialization rather than the control Constructor.
>
> If the control is supposed to handle drag and drop, you need to tell it which type of item it needs to be able to handle. The following example informs the control that pictures and files can be dropped on it. The type of the file it needs to support is specified via the File Types Editor.
>
> ``` xojo
> Sub Opening()
>   Me.AcceptPictureDrop
>   Me.AcceptFileDrop("JPEG")
> End Sub
> ```

<div id="desktopbevelbutton.pressed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopBevelButton.Pressed

**Pressed**

> The <span class="title-ref">DesktopBevelButton</span> has been pressed.
>
> This code displays text in a `DesktopLabel</api/user_interface/desktop/desktoplabel>` when the button is pressed.
>
> ``` xojo
> TextField1.Text = Me.Window.Title
> ```

## Notes

<div class="note">

<div class="title">

Note

</div>

On macOS, <span class="title-ref">DesktopBevelButton</span> is not a native control and does not automatically change its appearance in dark mode.

</div>

A <span class="title-ref">DesktopBevelButton</span> 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 <span class="title-ref">DesktopBevelButton</span>, aligns it, and specifies the position of the caption. The graphic, "DatabaseQueryIcon," has been added to the project.

``` xojo
Me.Icon = DatabaseQueryIcon
Me.IconAlignment = DesktopBevelButton.IconAlignments.TopLeft
Me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
Me.CaptionPosition = DesktopBevelButton.CaptionPositions.RightOfIcon
Me.IconDeltaX = 2
Me.IconDeltaY = 1
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following code creates a bevel button menu.

``` xojo
Var months() As String = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")

me.Caption = "Month"
me.CaptionAlignment = DesktopBevelButton.CaptionAlignments.Left
me.MenuStyle = DesktopBevelButton.MenuStyles.Right

Var myMenu As New DesktopMenuItem
For Each m As String In months
  myMenu.AddMenu(New DesktopMenuItem(m))
Next m

me.Menu = myMenu
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following line of code in the <span class="title-ref">DesktopBevelButton</span>'s MenuSelected event handler sets the <span class="title-ref">DesktopBevelButton</span> caption to the value that the user selects:

``` xojo
Me.Caption = SelectedItem.Text
```

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`DesktopUIControl</api/user_interface/desktop/desktopuicontrol>` parent class; `DesktopComboBox</api/user_interface/desktop/desktopcombobox>`, `DesktopPopupMenu</api/user_interface/desktop/desktoppopupmenu>`, `DesktopButton</api/user_interface/desktop/desktopbutton>` controls.

</div>
