WebSegmentedControl.Selected

From Xojo Documentation

Method


WebSegmentedControl.Selected(Index as Integer, Assigns Value as Boolean)

New in 2010r4

Supported for all project types and targets.


Sets the selection of a segment. If True, the segment is selected. The selected segment has a dark background.


Method

WebSegmentedControl.Selected(Index as Integer) As Boolean

New in 2010r4

Supported for all project types and targets.


Gets the selection of a segment. Returns True, if the segment is selected. The selected segment has a dark background.

Notes

The Selected property can also be set in the IDE by placing the control in Selected Cell mode. In this mode, the Selected Cell group appears in the Properties pane and the values for the selected cell are editable.

If SelectionType is None, then no segment can be depressed. This means that this property cannot be set to True. In this mode, a segment behaves like a PushButton and appears with a dark background only for the duration of the mouse click.

Example

The following selects the third segment:

Me.Selected(2) = True

The following example gets the value of the second segment:

If Me.Selected(1) Then
MsgBox("second segment selected")
End If