WebSegmentedControl.Caption

From Xojo Documentation

Method

WebSegmentedControl.Caption(Index As Integer) As String

New in 2010r4

Supported for all project types and targets.

Gets the caption text of the passed segment. Index is zero-based.

Notes

The Caption can be surrounded by "<raw></raw>" tags to temporarily disable HTML parsing. For example, you could bold just a single word in a Caption by doing this:

Me.Caption(0) = "<raw><b>bold</b></raw> text"

Sample Code

This code (in the Action event handler of the WebSegmentedControl) displays the name of the segment that was clicked:

MessageBox(Me.Caption(SegmentIndex))