類別:TouchBarLabel
類別:TouchBarLabel
在原生 macOS 應用程式的觸控列中建立標籤
程序:主
此類別不會從 'electron'
模組匯出。它僅作為 Electron API 中其他方法的返回值提供。
new TouchBarLabel(options)
在定義 accessibilityLabel
時,請務必考慮 macOS 最佳實務。
實例屬性
以下屬性可在 TouchBarLabel
的實例上使用
touchBarLabel.label
代表標籤目前文字的 string
。變更此值會立即更新觸控列中的標籤。
touchBarLabel.accessibilityLabel
一個 string
,表示螢幕閱讀器要讀取的標籤描述。
touchBarLabel.textColor
代表標籤目前文字顏色的 string
十六進位代碼。變更此值會立即更新觸控列中的標籤。