object:setActiveSegment()

Type Function
Library widget.*
Return value none
Revision Release 2024.3703
Keywords widget, segmented control, SegmentedControlWidget, setActiveSegment
See also object.segmentNumber
widget.newSegmentedControl()
SegmentedControlWidget

Overview

Sets the active segment for a SegmentedControlWidget.

Syntax

object:setActiveSegment( segmentNumber )
segmentNumber (required)

Number. The segment to set as active. Minimum value is 1. Maximum value is the total number of segments in the control.

Example

-- Set segment #3 as active
mySegmentedControl:setActiveSegment( 3 )