PowerPoint.TextVerticalAlignment enum
Representa la alineación vertical de un PowerPoint.TextFrame en un PowerPoint.Shape. Si se selecciona una de las opciones centradas, el contenido de TextFrame
se centrará horizontalmente dentro de Shape
como un grupo. Para cambiar la alineación horizontal de un texto, vea PowerPoint.ParagraphFormat y PowerPoint.ParagraphHorizontalAlignment.
Comentarios
[ Conjunto de API: PowerPointApi 1.4 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/shapes.yaml
// This function gets the collection of shapes on the first slide,
// and adds a brace pair, {}, to the collection, while specifying its
// location and size. Then it names the shape, sets its text and font
// color, and centers it inside the braces.
await PowerPoint.run(async (context) => {
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
const braces: PowerPoint.Shape = shapes.addGeometricShape(PowerPoint.GeometricShapeType.bracePair, {
left: 100,
top: 400,
height: 50,
width: 150
});
braces.name = "Braces";
braces.textFrame.textRange.text = "Shape text";
braces.textFrame.textRange.font.color = "purple";
braces.textFrame.verticalAlignment = PowerPoint.TextVerticalAlignment.middleCentered;
return context.sync();
});
Campos
bottom = "Bottom" | Especifica que |
bottomCentered = "BottomCentered" | Especifica que |
middle = "Middle" | Especifica que se debe alinear el |
middleCentered = "MiddleCentered" | Especifica que |
top = "Top" | Especifica que debe alinearse en la |
topCentered = "TopCentered" | Especifica que |