Enum TextButtonStyle
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
TextButtonStyle
מאפיין enum שמציין את הסגנון של TextButton
.
OUTLINED
היא ברירת המחדל. היא יוצרת לחצן טקסט פשוט עם רקע בהיר.
לחצני FILLED
כוללים צבע רקע שאפשר להגדיר באמצעות TextButton.setBackgroundColor(backgroundColor)
.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
CardService.TextButtonStyle.OUTLINED
.
מאפיינים
נכס | סוג | תיאור |
OUTLINED | Enum | לחצן טקסט רגיל עם רקע שקוף. ברירת מחדל. |
TEXT | Enum | אין להשתמש בו. גרסה לא רלוונטית של OUTLINED. אל תסירו את השדה עד שתאשרו שאף אפליקציה לא משתמשת בו. |
FILLED | Enum | לחצן טקסט עם רקע צבעוני. |
FILLED_TONAL | Enum | לחצן טקסט רגיל עם פתרון ביניים חלופי בין לחצנים מלאים ללחצנים עם קווים. |
BORDERLESS | Enum | לחצן טקסט רגיל ללא שוליים. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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. |"]]