Mit Sammlungen den Überblick behalten Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ausrichtung
Ein Enum, das die unterstützten Arten der Bildausrichtung darstellt. Unter FormApp.Alignment können Sie auf die Ausrichtungstypen zugreifen.
Wenn Sie ein Enum aufrufen möchten, rufen Sie die übergeordnete Klasse, den Namen und die Eigenschaft auf. Beispiel: FormApp.Alignment.LEFT.
// Open a form by ID and add a new image item with alignmentconstform=FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');constimg=UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');form.addImageItem().setImage(img).setAlignment(FormApp.Alignment.CENTER);
Attribute
Attribut
Typ
Beschreibung
LEFT
Enum
Richten Sie das Bild links im Formular aus.
CENTER
Enum
Richten Sie das Bild in der Mitte des Formulars aus.
RIGHT
Enum
Richten Sie das Bild an der rechten Seite des Formulars aus.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eFormApp.Alignment\u003c/code\u003e is an enum used to define the alignment of images within a Google Form.\u003c/p\u003e\n"],["\u003cp\u003eImage alignment options include \u003ccode\u003eLEFT\u003c/code\u003e, \u003ccode\u003eCENTER\u003c/code\u003e, and \u003ccode\u003eRIGHT\u003c/code\u003e, which can be accessed using \u003ccode\u003eFormApp.Alignment.LEFT\u003c/code\u003e, \u003ccode\u003eFormApp.Alignment.CENTER\u003c/code\u003e, and \u003ccode\u003eFormApp.Alignment.RIGHT\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the alignment of an image item in your form using the \u003ccode\u003esetAlignment()\u003c/code\u003e method and passing in the desired \u003ccode\u003eFormApp.Alignment\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["Alignment\n\nAn enum representing the supported types of image alignment. Alignment types can be accessed from\n[FormApp.Alignment](/apps-script/reference/forms/form-app#Alignment).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nFormApp.Alignment.LEFT`.\n\n```javascript\n// Open a form by ID and add a new image item with alignment\nconst form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');\nconst img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');\nform.addImageItem().setImage(img).setAlignment(FormApp.Alignment.CENTER);\n``` \n\nProperties\n\n| Property | Type | Description |\n|----------|--------|------------------------------------------------|\n| `LEFT` | `Enum` | Align the image to the left side of the form. |\n| `CENTER` | `Enum` | Align the image to the center of the form. |\n| `RIGHT` | `Enum` | Align the image to the right side of the form. |"]]