Skip to main content

Метод Shape.setShapeProperties

Метод устанавливает свойства фигуры ShapeProperties.

Пример для текстового документа:​


Shapes shapes = document.getRange().getShapes();
ShapesEnumerator shapesEnumerator = shapes.getEnumerator();
foreach (var shape in shapesEnumerator)
{
Shape shape = enumerator->getCurrent();

ShapeProperties shapeProperties = shape.getShapeProperties()
shapeProperties.textDirection = TextDirection.Vertical;
shape.setShapeProperties(shapeProperties);
}

Пример для табличного документа:​


Shapes shapes = table.getShapes();
ShapesEnumerator shapesEnumerator = shapes.getEnumerator();
foreach (var shape in shapesEnumerator)
{
Shape shape = enumerator->getCurrent();

ShapeProperties shapeProperties = shape.getShapeProperties()
shapeProperties.textDirection = TextDirection.Vertical;
shape.setShapeProperties(shapeProperties);
}