SegmentedControl

How can we deselect all segments of a segmented control in code ?

In IDE, I put -1 for value and it works.
In code, « segmentedcontrol1.value = -1 » give me an out of bounds exception.

iterate over the segments & set them all to not selected

My mistake : I should have said « IOSSegmentedControl » and Xojo 2015 R3.1

Still I do not see any ‘selected’ property for IOSSegmentedControl.

After putting my glasses on, I see the ‘item’ method that did the job…

segmentedcontrol1.item(2).selected=false