Header menu logo fable-electron-docs-api

TouchBarSegmentedControl Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Create a segmented control (a button group) where one button has a selected stateProcess: Main This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API.

Constructors

Constructor Description

TouchBarSegmentedControl(segments, ?segmentStyle, ?mode, ?selectedIndex, ?change)

Full Usage: TouchBarSegmentedControl(segments, ?segmentStyle, ?mode, ?selectedIndex, ?change)

Parameters:
    segments : SegmentedControlSegment[] - An array of segments to place in this control.
    ?segmentStyle : SegmentStyle - Style of the segments:
    ?mode : Mode - The selection mode of the control:
    ?selectedIndex : int - The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.
    ?change : int * bool -> unit - Called when the user selects a new segment.

Returns: TouchBarSegmentedControl
segments : SegmentedControlSegment[]

An array of segments to place in this control.

?segmentStyle : SegmentStyle

Style of the segments:

?mode : Mode

The selection mode of the control:

?selectedIndex : int

The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.

?change : int * bool -> unit

Called when the user selects a new segment.

Returns: TouchBarSegmentedControl

Instance members

Instance member Description

this.mode

Full Usage: this.mode

A string representing the current selection mode of the control. Can be single, multiple or buttons.

this.segmentStyle

Full Usage: this.segmentStyle

A string representing the controls current segment style. Updating this value immediately updates the control in the touch bar.

this.segments

Full Usage: this.segments

A SegmentedControlSegment[] array representing the segments in this control. Updating this value immediately updates the control in the touch bar. Updating deep properties inside this array does not update the touch bar.

this.selectedIndex

Full Usage: this.selectedIndex

An Integer representing the currently selected segment. Changing this value immediately updates the control in the touch bar. User interaction with the touch bar will update this value automatically.

Type something to start searching.