text property

TextBoxControl.text property

Gets or sets a text of the control.

@property
def text(self) -> str:
    ...

@text.setter
def text(self, value: str):
    ...

Examples

Shows how to change text of the TextBox OLE control.

doc = aw.Document(file_name=MY_DIR + 'Textbox control.docm')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
text_box_control = shape.ole_format.ole_control.as_text_box_control()
self.assertEqual('Aspose.Words test', text_box_control.text)
text_box_control.text = 'Updated text'
self.assertEqual('Updated text', text_box_control.text)

See Also