# Toolbar

Xojo provides a <span class="title-ref">Toolbar</span> control for desktop, mobile and web projects:

- `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`
- `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`
- `WebToolbar</api/user_interface/web/webtoolbar>`

## Common members

These events and methods are both common amongst the desktop, mobile and web versions of the control and are the most commonly used. See the individual controls for more members and details.

### Events

| Name    | Description                                                         |
|---------|---------------------------------------------------------------------|
| Pressed | A button in the <span class="title-ref">toolbar</span> was pressed. |

<div class="note">

<div class="title">

Note

</div>

In mobile projects, the `MobileToolbar</api/user_interface/mobile/mobiletoolbar>` is built-in to the `Screen</api/user_interface/mobile/mobilescreen>` which has a `ToolbarButtonPressed<mobilescreen.toolbarbuttonpressed>` event.

</div>

### Methods

| Name           | Description                                                                                                                      |
|----------------|----------------------------------------------------------------------------------------------------------------------------------|
| AddButton      | Adds the <span class="title-ref">toolbar</span> button passed to the <span class="title-ref">toolbar</span>.                     |
| AddButtonAt    | Adds the <span class="title-ref">toolbar</span> button passed to the <span class="title-ref">toolbar</span> at the index passed. |
| ButtonAt       | Returns the <span class="title-ref">toolbar</span> button at the index passed.                                                   |
| RemoveButtonAt | Removes the <span class="title-ref">toolbar</span> button at the index passed.                                                   |

<div class="note">

<div class="title">

Note

</div>

The WebToolbar uses *item* rather than *button* in these methods names but the functionality is the same.

</div>

<div class="seealso">

`DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`, `MobileToolbar</api/user_interface/mobile/mobiletoolbar>` and `WebToolbar</api/user_interface/web/webtoolbar>`

</div>
