Skip to main content

Метод TextBox::setShapeProperties

Метод устанавливает свойства текстового поля ShapeProperties.

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


CO::API::Document::TextBoxes textBoxes = document.getRange().getTextBoxes();
std::shared_ptr<Enumerator<TextBox>> enumerator = textBoxes.getEnumerator();
while (enumerator->isValid())
{
TextBox textBox = enumerator->getCurrent();

ShapeProperties shapeProperties = textBox.getShapeProperties()
shapeProperties.textDirection = TextDirection::Vertical;
textBox.setShapeProperties(shapeProperties);

enumerator->goToNext();
}

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


std::shared_ptr<Enumerator<TextBox>> enumerator = table.getTextBoxes().getEnumerator();
while (enumerator->isValid())
{
TextBox textBox = enumerator->getCurrent();

ShapeProperties shapeProperties = textBox.getShapeProperties()
shapeProperties.textDirection = TextDirection::Vertical;
textBox.setShapeProperties(shapeProperties);

enumerator->goToNext();
}