Segment
Inherits: Control
A segment for a SegmentedButton.
Properties
-
icon(IconDataOrControl | None) –The icon to be displayed in the segment.
-
label(StrOrControl | None) –The label (usually a
Text) to be displayed in the segment. -
value(str) –Used to identify this segment.
Properties#
icon
class-attribute
instance-attribute
#
icon: IconDataOrControl | None = None
The icon to be displayed in the segment.
Typically an Icon.
Raises:
-
ValueError–If neither it nor
labelis set and visible.
label
class-attribute
instance-attribute
#
label: StrOrControl | None = None
The label (usually a Text) to be displayed in the segment.
Raises:
-
ValueError–If neither it nor
iconis set and visible.