Class

# WebSegment

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

## Description

A single segment in a `WebSegmentedButton</api/user_interface/web/websegmentedbutton>` control.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                              | Type                                   | Read-Only | Shared |
|-----------------------------------|----------------------------------------|-----------|--------|
| `Caption<websegment.caption>`     | `String</api/data_types/string>`       |           |        |
| `Enabled<websegment.enabled>`     | `Boolean</api/data_types/boolean>`     |           |        |
| `Icon<websegment.icon>`           | `WebPicture</api/graphics/webpicture>` |           |        |
| `Indicator<websegment.indicator>` | `Indicators<webuicontrol.indicators>`  |           |        |
| `Selected<websegment.selected>`   | `Boolean</api/data_types/boolean>`     |           |        |
| `Tooltip<websegment.tooltip>`     | `String</api/data_types/string>`       |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                   | Parameters                                                                                                                                                                                          | Returns | Shared |
|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<websegment.constructor0>` | title As `String</api/data_types/string>`, selected As `Boolean</api/data_types/boolean>` = `False</api/language/false>`, icon As `WebPicture</api/graphics/webpicture>` = `Nil</api/language/nil>` |         |        |
|                                        | icon As `WebPicture</api/graphics/webpicture>`                                                                                                                                                      |         |        |

## Property descriptions

<div id="websegment.caption">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Caption

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

> The text that will appear in the segment.

<div id="websegment.enabled">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Enabled

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

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

<div id="websegment.icon">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Icon

**Icon** As `WebPicture</api/graphics/webpicture>`

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

<div id="websegment.indicator">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Indicator

**Indicator** As `Indicators<webuicontrol.indicators>`

> The color scheme for the control.

<div id="websegment.selected">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Selected

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

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

<div id="websegment.tooltip">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Tooltip

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

> The tooltip that will display when the user hovers over the segment.

## Method descriptions

<div id="websegment.constructor0">

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

</div>

<div class="rst-class">

forsearch

</div>

WebSegment.Constructor

**Constructor**(title As `String</api/data_types/string>`, selected As `Boolean</api/data_types/boolean>` = `False</api/language/false>`, icon As `WebPicture</api/graphics/webpicture>` = `Nil</api/language/nil>`)

> <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">WebSegment</span> with the values passed.

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

**Constructor**(icon As `WebPicture</api/graphics/webpicture>`)

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

## Compatibility

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

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `WebSegmentedButton</api/user_interface/web/websegmentedbutton>` control.

</div>
