zoukankan      html  css  js  c++  java
  • 触摸板分段控制 | TouchBarSegmentedControl (TouchBarSegmentedControl) – Electron 中文开发手册

    [

    触摸板分段控制 | TouchBarSegmentedControl (TouchBarSegmentedControl) - Electron 中文开发手册
    创建一个按钮具有选定状态的分段控件(按钮组) 过程:主

    new TouchBarSegmentedControl(options) 试验

    options 目的 segmentStyle 字符串 - (可选)段的样式: automatic - 默认。根据显示控件的窗口类型和窗口内的位置自动确定分段控件的外观。rounded - 使用圆形样式显示控件。textured-rounded - 使用纹理圆角样式显示控件。round-rect - 使用圆形矩形样式显示控件。textured-square - 使用纹理方形样式显示控件。capsule - 使用胶囊样式显示控件small-square - 控件使用小方块样式显示。separated - 控件中的分段显示得非常接近,但未触及。

    -  `mode` String - (optional) The selection mode of the control: 
        -  `single` - Default. One item selected at a time, selecting one deselects the previously selected item.
        -  `multiple` - Multiple items can be selected at a time.
        -  `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active.
    -  `segments` [SegmentedControlSegment[]](../structures/segmented-control-segment/index) - An array of segments to place in this control.
    -  `selectedIndex` Integer (optional) - 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` Function - Called when the user selects a new segment 
        -  `selectedIndex` Integer - The index of the segment the user selected.
        -  `isSelected` Boolean - Whether as a result of user selection the segment is selected or not.

    实例属性

    以下属性可用于以下TouchBarSegmentedControl实例:

    touchBarSegmentedControl.segmentStyle

    一个String代表当前控制段风格。更新此值立即更新触摸栏中的控件。

    touchBarSegmentedControl.segments

    表示此控件中的段SegmentedControlSegment[]的数组。更新此值立即更新触摸栏中的控件。更新此阵列中的深层属性不会更新触摸栏。

    touchBarSegmentedControl.selectedIndex

    一个Integer表示当前选择的段。更改此值立即更新触摸栏中的控件。用户与触摸栏的交互将自动更新此值。

    ]
    转载请保留页面地址:https://www.breakyizhan.com/javascript/25938.html
  • 相关阅读:
    cron表达式
    特殊二叉树和平衡二叉树和树的遍历
    进阶之常见算法和算法题
    原码,反码,补码、移码
    PostgreSQL 大小写问题 一键修改表名、字段名为小写
    ImportError: cannot import name 'PackageFinder' from 'pip._internal.index'
    安装pl/sql developer(内附下载地址)
    oracle plsql的结构
    oracle数据库基本操作
    java的高并发IO原理,阻塞BIO同步非阻塞NIO,异步非阻塞AIO
  • 原文地址:https://www.cnblogs.com/breakyizhan/p/13239330.html
Copyright © 2011-2022 走看看