DesktopSegmentedButton.SelectedSegment

From Xojo Documentation

Read-Only Property (As Segment )
SegmentValue = aDesktopSegmentedButton.SelectedSegment

New in 2021r3

Supported for all project types and targets.

Provides the Segment at the requested index.

Notes

For multi-selection SegmentedButtons this returns the last segment that was selected.