Aspose::Words::Drawing::TextBox::get_InternalMarginRight method

TextBox::get_InternalMarginRight method

Specifies the inner right margin in points for a shape.

double Aspose::Words::Drawing::TextBox::get_InternalMarginRight()

Remarks

The default value is 1/10 inch.

Examples

Shows how to set internal margins for a text box.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);

// Insert another textbox with specific margins.
SharedPtr<Shape> textBoxShape = builder->InsertShape(ShapeType::TextBox, 100, 100);
SharedPtr<TextBox> textBox = textBoxShape->get_TextBox();
textBox->set_InternalMarginTop(15);
textBox->set_InternalMarginBottom(15);
textBox->set_InternalMarginLeft(15);
textBox->set_InternalMarginRight(15);

builder->MoveTo(textBoxShape->get_LastParagraph());
builder->Write(u"Text placed according to textbox margins.");

doc->Save(ArtifactsDir + u"Shape.TextBoxMargins.docx");

See Also