TextBoxControl class
TextBoxControl class
The TextBox control displays text from an organized set of data or user input.
Inheritance: TextBoxControl → MorphDataControl → Forms2OleControl → OleControl
Properties
Name | Description |
---|---|
caption | Gets Caption property of control. Default value is an empty string. (Inherited from Forms2OleControl) |
child_nodes | Gets collection of immediate child controls. (Inherited from Forms2OleControl) |
enabled | Returns True if control is in enabled state.(Inherited from Forms2OleControl) |
group_name | Gets or sets a string that specifies a group of mutually exclusive controls. The default value is an empty string. (Inherited from Forms2OleControl) |
is_forms2_ole_control | Returns True if the control is a Forms2OleControl.(Inherited from OleControl) |
name | Gets or sets name of the ActiveX control. (Inherited from OleControl) |
text | Gets or sets a text of the control. |
type | Gets type of Forms 2.0 control. |
value | Gets underlying Value property which often represents control state. For example checked option button has ‘1’ value while unchecked has ‘0’. Default value is an empty string. (Inherited from Forms2OleControl) |
Methods
Name | Description |
---|
Examples
Shows how to change text of the TextBox OLE control.
doc = aw.Document(MY_DIR + "Textbox control.docm")
shape = doc.get_child(NodeType.SHAPE, 0, True).as_shape()
textBoxControl = shape.ole_format.ole_control.as_forms2_ole_control().as_text_box_control()
self.assertEqual("Aspose.Words test", textBoxControl.text)
textBoxControl.text = "Updated text"
self.assertEqual("Updated text", textBoxControl.text)
See Also
- module aspose.words.drawing.ole
- class MorphDataControl