# SegmentedButton

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

- `DesktopSegmentedButton</api/user_interface/desktop/desktopsegmentedbutton>`
- `MobileSegmentedButton</api/user_interface/mobile/mobilesegmentedbutton>`
- `WebSegmentedButton</api/user_interface/web/websegmentedbutton>`

## Common members

These events, methods and properties 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 segment was pressed. |

### Methods

| Name              | Description                                                                                                                                |
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| AddSegment        | Adds a segment to the <span class="title-ref">SegmentedButton</span>. Not currently supported for web projects.                            |
| AddSegmentAt      | Adds a segment to the <span class="title-ref">SegmentedButton</span> at the index passed. Not currently supported for web projects.        |
| RemoveAllSegments | Removes all segments from the <span class="title-ref">SegmentedButton</span>. Not currently supported for web projects.                    |
| RemoveSegmentAt   | Removes the segment at the index passed from the <span class="title-ref">SegmentedButton</span>. Not currently supported for web projects. |
| SegmentAt         | Returns the segment at the index passed.                                                                                                   |

### Properties

| Name                 | Description                                          |
|----------------------|------------------------------------------------------|
| SegmentCount         | The number of segments.                              |
| SelectedSegment      | The segment that is currently selected.              |
| SelectedSegmentIndex | The index of the segment that is currently selected. |

<div class="seealso">

`DesktopSegmentedButton</api/user_interface/desktop/desktopsegmentedbutton>`, `MobileSegmentedButton</api/user_interface/mobile/mobilesegmentedbutton>` and `WebSegmentedButton</api/user_interface/web/websegmentedbutton>`

</div>
