Enum TextButtonStyle
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
TextSchaltflächeStil
Ein Enum, das den Stil für TextButton
angibt.
OUTLINED
ist die Standardeinstellung. Es wird eine einfache Textschaltfläche mit transparentem Hintergrund gerendert.
FILLED
-Schaltflächen haben eine Hintergrundfarbe, die Sie mit TextButton.setBackgroundColor(backgroundColor)
festlegen können.
Wenn Sie ein Enum aufrufen möchten, rufen Sie die übergeordnete Klasse, den Namen und die Eigenschaft auf. Beispiel:
CardService.TextButtonStyle.OUTLINED
.
Attribute
Attribut | Typ | Beschreibung |
OUTLINED | Enum | Schaltfläche mit normalem Text und transparentem Hintergrund Standard. |
TEXT | Enum | NICHT VERWENDEN. Eingestellte Version von OUTLINED. Entfernen Sie das Feld erst, wenn Sie sicher sind, dass es von keiner App verwendet wird. |
FILLED | Enum | Textschaltfläche mit farbigem Hintergrund. |
FILLED_TONAL | Enum | Normale Textschaltfläche, die eine Alternative zwischen gefüllten und umrandeten Schaltflächen darstellt. |
BORDERLESS | Enum | Schaltfläche mit normalem Text ohne Rahmen. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 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. |"]]