Enum TextButtonStyle
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TextButtonStyle
อาร์เรย์แบบจำกัดที่ระบุสไตล์สําหรับ TextButton
OUTLINED
เป็นค่าเริ่มต้น ซึ่งจะแสดงผลปุ่มข้อความธรรมดาที่มีพื้นหลังสีใส
ปุ่ม FILLED
มีสีพื้นหลังที่คุณตั้งค่าได้ด้วย TextButton.setBackgroundColor(backgroundColor)
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.TextButtonStyle.OUTLINED
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
OUTLINED | Enum | ปุ่มข้อความปกติที่มีพื้นหลังสีใส ค่าเริ่มต้น |
TEXT | Enum | โปรดอย่าใช้ เวอร์ชัน OUTLINED ที่เลิกใช้งานแล้ว อย่านำช่องออกจนกว่าจะยืนยันว่าไม่มีแอปใดใช้อยู่ |
FILLED | Enum | ปุ่มข้อความที่มีพื้นหลังสี |
FILLED_TONAL | Enum | ปุ่มข้อความปกติที่มีรูปลักษณ์อยู่ระหว่างปุ่มแบบเติมสีกับปุ่มที่มีเส้นขอบ |
BORDERLESS | Enum | ปุ่มข้อความปกติที่ไม่มีเส้นขอบ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eTextButtonStyle\u003c/code\u003e is used to define the style of a \u003ccode\u003eTextButton\u003c/code\u003e in Google Apps Script's Card Service.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two options: \u003ccode\u003eOUTLINED\u003c/code\u003e (default, transparent background) and \u003ccode\u003eFILLED\u003c/code\u003e (colored background, customizable with \u003ccode\u003esetBackgroundColor()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eTo use a style, refer to it using the syntax: \u003ccode\u003eCardService.TextButtonStyle.STYLE_NAME\u003c/code\u003e (e.g., \u003ccode\u003eCardService.TextButtonStyle.OUTLINED\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Enum TextButtonStyle\n\nTextButtonStyle\n\nAn enum that specifies the style for [TextButton](/apps-script/reference/card-service/text-button).\n\n\n`OUTLINED` is the default; it renders a simple text button with clear background.\n`FILLED` buttons have a background color you can set with [TextButton.setBackgroundColor(backgroundColor)](/apps-script/reference/card-service/text-button#setBackgroundColor(String)).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.TextButtonStyle.OUTLINED`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|-----------------------------------------------------------------------------------------------------------------------|\n| `OUTLINED` | `Enum` | Normal text button with clear background. Default. |\n| `TEXT` | `Enum` | DO NOT USE. Deprecated version of OUTLINED. Do not remove the field until it is confirmed not being used by any apps. |\n| `FILLED` | `Enum` | Text button with colored background. |\n| `FILLED_TONAL` | `Enum` | Normal text button with an alternative middle ground between filled and outlined buttons. |\n| `BORDERLESS` | `Enum` | Normal text button with no border. |"]]