Enum TextButtonStyle
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
TestoPulsanteStile
Un enum che specifica lo stile per TextButton
.
OUTLINED
è il valore predefinito; viene visualizzato un semplice pulsante di testo con sfondo trasparente.
I pulsanti FILLED
hanno un colore di sfondo che puoi impostare con TextButton.setBackgroundColor(backgroundColor)
.
Per chiamare un enum, devi chiamare la relativa classe, il nome e la proprietà di base. Ad esempio,
CardService.TextButtonStyle.OUTLINED
.
Proprietà
Proprietà | Tipo | Descrizione |
OUTLINED | Enum | Pulsante di testo normale con sfondo trasparente. Predefinita. |
TEXT | Enum | NON UTILIZZARE. Versione ritirata di OUTLINED. Non rimuovere il campo finché non viene confermato che non viene utilizzato da nessuna app. |
FILLED | Enum | Pulsante di testo con sfondo colorato. |
FILLED_TONAL | Enum | Pulsante di testo normale con una via di mezzo alternativa tra i pulsanti con riempimento e con contorni. |
BORDERLESS | Enum | Pulsante di testo normale senza bordo. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]