Class

# MobileToolbar

<div class="rst-class">

forsearch

</div>

Toolbar

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

## Description

A toolbar can be displayed in a screen as a Toolbar or Navigation Bar.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                       | Type                               | Read-Only | Shared |
|--------------------------------------------|------------------------------------|-----------|--------|
| `Count<mobiletoolbar.count>`               | `Integer</api/data_types/integer>` | ✓         |        |
| `OverflowIcon<mobiletoolbar.overflowicon>` | `Picture</api/graphics/picture>`   |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                               | Parameters                                                                                                                   | Returns                                                               | Shared |
|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|--------|
| `AddButton<mobiletoolbar.addbutton>`               | button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`                                              |                                                                       |        |
| `AddButtonAt<mobiletoolbar.addbuttonat>`           | index As `Integer</api/data_types/integer>`, button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |                                                                       |        |
| `ButtonAt<mobiletoolbar.buttonat>`                 | index As `Integer</api/data_types/integer>`                                                                                  | `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |        |
| `RemoveAllButtons<mobiletoolbar.removeallbuttons>` |                                                                                                                              |                                                                       |        |
| `RemoveButtonAt<mobiletoolbar.removebuttonat>`     | index As `Integer</api/data_types/integer>`                                                                                  |                                                                       |        |

## Property descriptions

<div id="mobiletoolbar.count">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.Count

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

> The number of buttons on the toolbar.
>
> This property is read-only.
>
> If Count = 0 then no toolbar is displayed.
>
> Get the count of buttons on a `Screen</api/user_interface/mobile/mobilescreen>`:
>
> ``` xojo
> Var buttonCount As Integer = Toolbar.Count
> ```

<div id="mobiletoolbar.overflowicon">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.OverflowIcon

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

> The overflow icon of the toolbar.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is currently supported for Android only.
>
> </div>

## Method descriptions

<div id="mobiletoolbar.addbutton">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.AddButton

**AddButton**(button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

> Adds the *button* to the end of the toolbar.
>
> Add the Camera button to the right Navigation Bar:
>
> ``` xojo
> Var cameraButton As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
> RightNavigationToolbar.AddButton(cameraButton)
> ```

<div id="mobiletoolbar.addbuttonat">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.AddButtonAt

**AddButtonAt**(index As `Integer</api/data_types/integer>`, button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

> Adds the *button* to the toolbar at the *index* passed.
>
> Add a button at the first position of the toolbar:
>
> ``` xojo
> Toolbar.AddButtonAt(0, New MobileToolbarButton(MobileToolbarButton.Types.Camera))
> ```

<div id="mobiletoolbar.buttonat">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.ButtonAt

**ButtonAt**(index As `Integer</api/data_types/integer>`) As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`

> Gets the button on the toolbar at the specified *index*.
>
> Get the first button on the toolbar:
>
> ``` xojo
> Var button As MobileToolbarButton
> button = Toolbar.ButtonAt(0)
> ```
>
> Change the Caption of the last button on the toolbar:
>
> ``` xojo
> Toolbar.ButtonAt(Toolbar.Count - 1).Caption = "New"
> ```

<div id="mobiletoolbar.removeallbuttons">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.RemoveAllButtons

**RemoveAllButtons**

> Removes all the buttons from the bar.
>
> Remove all the buttons from the toolbar:
>
> ``` xojo
> Toolbar.RemoveAllButtons
> ```

<div id="mobiletoolbar.removebuttonat">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileToolbar.RemoveButtonAt

**RemoveButtonAt**(index As `Integer</api/data_types/integer>`)

> Removes the button at the specified *index* from the toolbar.
>
> Remove the first button from the toolbar:
>
> ``` xojo
> Toolbar.RemoveButtonAt(0)
> ```

## Notes

Accessed using the LeftNavigationToolbar, RightNavigationToolbar and Toolbar properties of the `MobileScreen</api/user_interface/mobile/mobilescreen>`.

## Compatibility

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

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `MobileScreen</api/user_interface/mobile/mobilescreen>`, `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` classes

</div>
