ElectronTouchBarSegmentedControlConstructorOptions
Unofficial
Options for creating a ElectronTouchBarSegmentedControl.
Import:
import type { ElectronTouchBarSegmentedControlConstructorOptions } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface ElectronTouchBarSegmentedControlConstructorOptionsProperties
| Property | Type | Description | |
|---|---|---|---|
| mode? | 'buttons' | 'multiple' | 'single' | The selection mode of the control. | |
| segments | ElectronSegmentedControlSegment[] | An array of segments to place in this control. | |
| segmentStyle? | 'automatic' | 'capsule' | 'round-rect' | 'rounded' | 'separated' | 'small-square' | 'textured-rounded' | 'textured-square' | Style of the segments. | |
| selectedIndex? | number | The index of the currently selected segment, updated automatically with user interaction. When the mode is multiple it will be the last selected item. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| change(selectedIndex, isSelected) | void | Callback invoked when the user selects a new segment. |