类:TouchBarSegmentedControl
类:TouchBarSegmentedControl
🌐 Class: TouchBarSegmentedControl
创建一个分段控制(按钮组),其中一个按钮处于选中状态
进程: 主进程
此类未从 'electron' 模块导出。它仅作为 Electron API 中其他方法的返回值提供。
new TouchBarSegmentedControl(options)
实例属性
🌐 Instance Properties
以下属性可在“TouchBarSegmentedControl”实例中获得:
🌐 The following properties are available on instances of TouchBarSegmentedControl:
touchBarSegmentedControl.segmentStyle
string 表示控件当前的分段样式。更新此值会立即更新触控栏中的控件。
🌐 A string representing the controls current segment style. Updating this value immediately updates the control
in the touch bar.
touchBarSegmentedControl.segments
一个 SegmentedControlSegment[] 数组,表示此控件中的各个片段。更新此值会立即更新触控栏中的控件。更新此数组中的深层属性 不会更新触控栏。
🌐 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.
touchBarSegmentedControl.selectedIndex
Integer 表示当前选中的段。更改此值会立即更新触控栏中的控件。用户与触控栏的交互将自动更新此值。
🌐 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.
touchBarSegmentedControl.mode
一个 string,表示控件的当前选择模式。可以是 single、multiple 或 buttons。
🌐 A string representing the current selection mode of the control. Can be single, multiple or buttons.