SegmentedControl

class pyto_ui.SegmentedControl(segments: list[str] = [])

A horizontal control made of multiple segments, each segment functioning as a discrete button. The function passed to action will be called when the segmented control changes its selection.

property segments: list[str]

A list of strings representing segments titles.

Return type:

list[str]

property selected_segment: int

The index of selected segment.

Return type:

int