Class

# MobileSegment

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

## Description

A single segment in a `MobileSegmentedButton</api/user_interface/mobile/mobilesegmentedbutton>` control.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                         | Type                               | Read-Only | Shared |
|--------------------------------------------------------------|------------------------------------|-----------|--------|
| `AllowMulticolorSymbol<mobilesegment.allowmulticolorsymbol>` | `Boolean</api/data_types/boolean>` |           |        |
| `Caption<mobilesegment.caption>`                             | `String</api/data_types/string>`   |           |        |
| `Enabled<mobilesegment.enabled>`                             | `Boolean</api/data_types/boolean>` |           |        |
| `Icon<mobilesegment.icon>`                                   | `Picture</api/graphics/picture>`   |           |        |
| `Selected<mobilesegment.selected>`                           | `Boolean</api/data_types/boolean>` |           |        |
| `Symbol<mobilesegment.symbol>`                               | `String</api/data_types/string>`   |           |        |
| `Width<mobilesegment.width>`                                 | `Double</api/data_types/double>`   |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                      | Parameters                                  | Returns | Shared |
|-------------------------------------------|---------------------------------------------|---------|--------|
| `Constructor<mobilesegment.constructor0>` | caption As `String</api/data_types/string>` |         |        |
| `Constructor<mobilesegment.constructor1>` | icon As `Picture</api/graphics/picture>`    |         |        |

## Property descriptions

<div id="mobilesegment.allowmulticolorsymbol">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.AllowMulticolorSymbol

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

> Allows to use multicolored version of the symbol when it is set to `True</api/language/true>`. If there is no multicolored version available, it will default to monochrome.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not currently supported for Android.
>
> </div>

<div id="mobilesegment.caption">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Caption

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

> The text that will appear in the segment.

<div id="mobilesegment.enabled">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Enabled

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

> `True</api/language/true>` if the <span class="title-ref">Segment</span> is enabled. The default is `True</api/language/true>`.
>
> This example disables the second <span class="title-ref">Segment</span>. It is in the Opening event of the `MobileSegmentedButton</api/user_interface/mobile/mobilesegmentedbutton>`.
>
> ``` xojo
> Var s As MobileSegment = Me.SegmentAt(1)
>
> s.Enabled = False
> ```

<div id="mobilesegment.icon">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Icon

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

> The icon/picture that will be displayed on the segment.

<div id="mobilesegment.selected">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Selected

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

> If `True</api/language/true>`, the segment is selected.

<div id="mobilesegment.symbol">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Symbol

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

> Allows setting the symbol name(s) to be used as the icon for the <span class="title-ref">MobileSegment</span>. If none is found it sets the assigned Picture from the Icon property. If any is found, then it sets this as the image instead of the Picture set on the Icon property.
>
> The list of supported symbols can be found here:
>
> - **Android**: <https://pictogrammers.com/library/mdi>
> - **macOS**: <https://developer.apple.com/design/human-interface-guidelines/sf-symbols>

<div id="mobilesegment.width">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Width

**Width** As `Double</api/data_types/double>`

> The width of the segment.

## Method descriptions

<div id="mobilesegment.constructor0">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Constructor

**Constructor**(caption As `String</api/data_types/string>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates a <span class="title-ref">MobileSegment</span> with the *caption* passed.

<div id="mobilesegment.constructor1">

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

</div>

<div class="rst-class">

forsearch

</div>

MobileSegment.Constructor

**Constructor**(icon As `Picture</api/graphics/picture>`)

> Creates a <span class="title-ref">MobileSegment</span> with the *icon* passed.

## Compatibility

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

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `MobileSegmentedButton</api/user_interface/mobile/mobilesegmentedbutton>` control.

</div>
