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 - チェーン用の Object。


setId(id)

変更するウィジェットの識別に使用される一意の ID を設定します。ウィジェットの変更はアドオンでのみサポートされています。

パラメータ

名前説明
idStringウィジェットの ID。64 文字以内で、`[a-zA-Z0-9-]+` の形式で指定します。

戻る

Widget - チェーン用のこのオブジェクト。


setVisibility(visibility)

ウィジェットの可視性を設定します。デフォルト値は `VISIBLE` です。

パラメータ

名前説明
visibilityVisibilityウィジェットの Visibility

戻る

Widget - チェーン用の Object。