フィードバックを送信
Enum Button
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ボタン
alert
または PromptResponse.getSelectedButton()
によって返される、ローカライズされた事前定義のダイアログ ボタンを表す列挙型。ダイアログ内のどのボタンをクリックしたかを示します。これらの値は設定できません。alert
または prompt
にボタンを追加するには、代わりに ButtonSet
を使用します。
列挙型を呼び出すには、親クラス、名前、プロパティを呼び出します。たとえば、
Base.Button.CLOSE
です。
// Display a dialog box with a message and "Yes" and "No" buttons.
var ui = DocumentApp.getUi();
var response = ui.alert('Are you sure you want to continue?', ui.ButtonSet.YES_NO);
// Process the user's response.
if (response == ui.Button.YES) {
Logger.log('The user clicked "Yes."');
} else {
Logger.log('The user clicked "No" or the dialog\'s close button.');
}
プロパティ
プロパティ 種類 説明
CLOSE
Enum
すべてのダイアログのタイトルバーに表示される標準の閉じるボタン。このボタンは明示的にダイアログに追加されていないため、削除できません。
OK
Enum
操作の続行が必要であることを示す「OK」ボタン。
CANCEL
Enum
オペレーションを続行しないことを示す [キャンセル] ボタン。
YES
Enum
質問に肯定的な回答が得られたことを示す [はい] ボタン。
NO
Enum
質問に対して否定的な回答があることを示す [いいえ] ボタン。
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンス により使用許諾されます。コードサンプルは Apache 2.0 ライセンス により使用許諾されます。詳しくは、Google Developers サイトのポリシー をご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-01 UTC。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"必要な情報がない"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"複雑すぎる / 手順が多すぎる"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"最新ではない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"サンプル / コードに問題がある"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]
ご意見をお聞かせください