WebSegmentedControl.SegmentCount

From Xojo Documentation

Property (As Integer )
aWebSegmentedControl.SegmentCount = newIntegerValue
or
IntegerValue = aWebSegmentedControl.SegmentCount

New in 2010r4

Supported for all project types and targets.

The number of segments in the control. Can be used to add or remove segments at run-time.

Sample Code

This code adds another segment to SegmentedContol1 on a WebPage:

SegmentedControl1.SegmentCount = SegmentedControl1.SegmentCount + 1

SegmentedControl1.Segment(SegmentedControl1.SegmentCount - 1) = "Segment " + _
Str(SegmentedControl1.SegmentCount)

This code removes the last segment:

SegmentedControl1.SegmentCount = SegmentedControl1.SegmentCount - 1