Class ButtonSet

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);

메서드

메서드반환 유형간략한 설명
addButton(button)ButtonSet버튼을 추가합니다.
addEventAction(eventAction)Widget위젯에서 실행할 수 있는 이벤트 작업을 추가합니다.
setId(id)Widget변형할 위젯을 식별하는 데 사용되는 할당된 고유 ID를 설정합니다.
setVisibility(visibility)Widget위젯의 공개 상태를 설정합니다.

자세한 문서

addButton(button)

버튼을 추가합니다.

매개변수

이름유형설명
buttonButton추가할 버튼입니다.

리턴

ButtonSet - 연결을 위한 이 객체


addEventAction(eventAction)

위젯에서 실행할 수 있는 이벤트 작업을 추가합니다.

매개변수

이름유형설명
eventActionEventAction추가할 EventAction입니다.

리턴

Widget - 연결을 위한 객체입니다.


setId(id)

변형할 위젯을 식별하는 데 사용되는 할당된 고유 ID를 설정합니다. 위젯 변형은 부가기능에서만 지원됩니다.

매개변수

이름유형설명
idString위젯의 ID입니다. 64자(영문 기준)로 제한되며 `[a-zA-Z0-9-]+` 형식입니다.

리턴

Widget - 연결을 위한 이 객체


setVisibility(visibility)

위젯의 공개 상태를 설정합니다. 기본값은 `VISIBLE`입니다.

매개변수

이름유형설명
visibilityVisibility위젯의 Visibility입니다.

리턴

Widget - 연결을 위한 객체입니다.