ESegmented Segmented
Examples
Value binding, disabled options and keyboard navigation
Segmented
Properties
blockboolMake the segmented control fill the available width.
falsecurrentIndexintIndex of the current selected or displayed item.
-1: no selection
0 and above: item index
0directionstringComponent layout direction.
"horizontal" / "vertical"
"horizontal"enabledboolAllow interaction; false disables the control.
trueheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightmodelvarArray of text, numbers or option objects.
Fields:
label, value, disabled
[]optionDelegateComponentComponent slot for custom option; null uses the default content. See this page’s examples for delegate context.
nullpropsvarObject configuring data field mappings and node behavior.
Fields:
label, value, disabled
({})sizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaultvalidateEventboolRequest enclosing-form validation when the value changes.
truevaluevarCurrent value; read or write through property bindings, with arrays for multiple or range selection.
undefinedvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthcurrentItemvarRead onlyData object of the current segmented option.
Computed at runtimecurrentValuevarRead onlyActual value of the current option.
Computed at runtimeSignals
selected(var value, int index)Emitted when a segment is selected; value is its value and index is its index.
Methods
selectValue(key)Select an option by its value.
select(index)Select the item identified by the given index or key.