Class ButtonSet
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
按鈕設定保存一組在資料列中顯示的 Button 物件。
適用於 Google Workspace 外掛程式和 Google Chat 應用程式。
const textButton = CardService.newTextButton();
// Finish building the text button...
const imageButton = CardService.newImageButton();
// Finish building the image button...
const buttonSet =
    CardService.newButtonSet().addButton(textButton).addButton(imageButton);
 
內容詳盡的說明文件
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-26 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],["The `ButtonSet` object holds and displays a row of `Button` objects.  You can create a `ButtonSet` using `CardService.newButtonSet()`.  To add buttons, use the `addButton(button)` method, passing in a `Button` object. This method can be chained to add multiple buttons sequentially. `addButton` returns the `ButtonSet` object itself. This functionality is available for Google Workspace add-ons and Google Chat apps.\n"]]