类:TouchBarSegmentedControl
类: TouchBarSegmentedControl
创建一个分段控件(一个按钮组),其中一个按钮具有选中状态
进程:主进程
此类未从 'electron' 模块导出。它仅作为 Electron API 中其他方法的返回值可用。
new TouchBarSegmentedControl(options)
实例属性
TouchBarSegmentedControl 实例上有以下属性可用
touchBarSegmentedControl.segmentStyle
一个表示控件当前分段样式的 string。更新此值会立即更新触摸栏中的控件。
touchBarSegmentedControl.segments
一个表示此控件中分段的 SegmentedControlSegment[] 数组。更新此值会立即更新触摸栏中的控件。更新此数组内的深层属性不会更新触摸栏。
touchBarSegmentedControl.selectedIndex
一个表示当前选中分段的 Integer。更改此值会立即更新触摸栏中的控件。与触摸栏的用户交互会自动更新此值。
touchBarSegmentedControl.mode
一个表示控件当前选择模式的 string。可以是 single、multiple 或 buttons。