Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Enum VerticalAlignment
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
VerticalAlignment
Una enumeración de los tipos de alineación vertical admitidos.
Para llamar a una enumeración, debes llamar a su clase superior, nombre y propiedad. Por ejemplo,
DocumentApp.VerticalAlignment.BOTTOM.
Usa la enumeración VerticalAlignment para establecer la alineación vertical de las celdas de la tabla.
const body =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Append table containing two cells.
const table = body.appendTable([['Top', 'Center', 'Bottom']]);
// Align the first cell's contents to the top.
table.getCell(0, 0).setVerticalAlignment(DocumentApp.VerticalAlignment.TOP);
// Align the second cell's contents to the center.
table.getCell(0, 1).setVerticalAlignment(DocumentApp.VerticalAlignment.CENTER);
// Align the third cell's contents to the bottom.
table.getCell(0, 2).setVerticalAlignment(DocumentApp.VerticalAlignment.BOTTOM);
Propiedades
| Propiedad | Tipo | Descripción |
BOTTOM | Enum | La opción de alineación inferior. |
CENTER | Enum | Opción de alineación central. |
TOP | Enum | La opción de alineación superior. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2026-04-13 (UTC)
[null,null,["Última actualización: 2026-04-13 (UTC)"],[],["`VerticalAlignment` enum sets the vertical alignment of table cells in a document. It's accessed via `DocumentApp.VerticalAlignment`. Available options are `BOTTOM`, `CENTER`, and `TOP`. To use it, call `setVerticalAlignment()` on a table cell object with the desired alignment type. The example code demonstrates creating a table with three cells and aligning their content to the top, center, and bottom, respectively.\n"]]