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);
 
详细文档
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-26。
  
  
  
    
      [null,null,["最后更新时间 (UTC):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"]]