PowerPoint.TextVerticalAlignment enum
Representa o alinhamento vertical de um PowerPoint.TextFrame num PowerPoint.Shape. Se uma das opções centradas estiver selecionada, o conteúdo do TextFrame
será centrado horizontalmente no Shape
como um grupo. Para alterar o alinhamento horizontal de um texto, consulte PowerPoint.ParagraphFormat e PowerPoint.ParagraphHorizontalAlignment.
Comentários
[ Conjunto de API: PowerPointApi 1.4 ]
Exemplos
// 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 o |
bottomCentered = "BottomCentered" | Especifica que o |
middle = "Middle" | Especifica que o |
middleCentered = "MiddleCentered" | Especifica que o |
top = "Top" | Especifica que o |
topCentered = "TopCentered" | Especifica que o |