Web Segmented Button
From Xojo Documentation
The WebSegmentedButton is a horizontal button made up of multiple segments. Each segment can be clicked independently of the others.
To edit the properties of the segments (Text, Icon and Selected) in the control, use the Set Default Value button on the Layout Editor toolbar or press Return when the control is selected.
Below are commonly used events, properties and methods. Refer to WebSegmentedButton in the Language Reference for the complete list.
- The Pressed event is called when a segment is clicked. It supplies a itemIndex parameter (0-based) that tells you which segment was clicked.
- Gets or sets the selected segment.
- This property is used to specify the number of segments.
- An Integer that indicates how the segments can be used.
|0||Single||Only one segment can be depressed. The group of segments behaves like a group of Radio Buttons. One is selected, the others are deselected automatically.|
|1||Multiple||The segments behave like a series of Check Boxes where two or more can be selected at the same time.|
|2||None||Each segment behaves like a Button. When a segment is selected, it is depressed (highlighted) only for the duration of the press or click.|
- Used to set the Text or Icon property of a segment identified by the itemIndex parameter (index is zero-based).
Use the SegmentedControl Pressed event handler to determine which segment was clicked:
To select a specific segment in code use the SelectedSegmentIndex property: