public class TextBoxControl extends MorphDataControl
Examples:
Shows how to change text of the TextBox OLE control.
Document doc = new Document(getMyDir() + "Textbox control.docm");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
TextBoxControl textBoxControl = (TextBoxControl)shape.getOleFormat().getOleControl();
Assert.assertEquals(textBoxControl.getText(), "Aspose.Words test");
textBoxControl.setText("Updated text");
Assert.assertEquals(textBoxControl.getText(), "Updated text");
CHECK_BOX_CONTROL_CLSID, COMBO_BOX_CONTROL_CLSID, COMMAND_BUTTON_CONTROL_CLSID, FORM_CONTROL_CLSID, FRAME_CONTROL_CLSID, HTML_HIDDEN_CLSID, HTML_SELECT_CLSID, HTML_SUBMIT_BUTTON_CLSID, HTML_TEXT_CLSID, IMAGE_CONTROL_CLSID, LABEL_CONTROL_CLSID, LIST_BOX_CONTROL_CLSID, MULTI_PAGE_CONTROL_CLSID, OPTION_BUTTON_CONTROL_CLSID, SCROLL_BAR_CONTROL_CLSID, SPIN_BUTTON_CONTROL_CLSID, TAB_STRIP_CONTROL_CLSID, TEXT_BOX_CONTROL_CLSID, TOGGLE_BUTTON_CONTROL_CLSID| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getClsidVirtual() |
java.lang.String |
getText()
Gets a text of the control.
|
int |
getType()
Gets type of Forms 2.0 control.
|
void |
setText(java.lang.String value)
Sets a text of the control.
|
getBackColor, getCaption, getChildNodes, getEnabled, getForeColor, getGroupName, getHeight, getProgId, getUserType, getValue, getWidth, setBackColor, setCaption, setForeColor, setGroupName, setHeight, setWidthgetClsidInternal, getExtensionForUser, getFileNameForUser, getId, getName, isEmpty, isForms2OleControl, isForms2OleControlInternal, setId, setNamepublic int getType()
Examples:
Shows how to change text of the TextBox OLE control.
Document doc = new Document(getMyDir() + "Textbox control.docm");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
TextBoxControl textBoxControl = (TextBoxControl)shape.getOleFormat().getOleControl();
Assert.assertEquals(textBoxControl.getText(), "Aspose.Words test");
textBoxControl.setText("Updated text");
Assert.assertEquals(textBoxControl.getText(), "Updated text");
getType in class Forms2OleControlForms2OleControlType constants.public java.lang.String getText()
Examples:
Shows how to change text of the TextBox OLE control.
Document doc = new Document(getMyDir() + "Textbox control.docm");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
TextBoxControl textBoxControl = (TextBoxControl)shape.getOleFormat().getOleControl();
Assert.assertEquals(textBoxControl.getText(), "Aspose.Words test");
textBoxControl.setText("Updated text");
Assert.assertEquals(textBoxControl.getText(), "Updated text");
public void setText(java.lang.String value)
Examples:
Shows how to change text of the TextBox OLE control.
Document doc = new Document(getMyDir() + "Textbox control.docm");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
TextBoxControl textBoxControl = (TextBoxControl)shape.getOleFormat().getOleControl();
Assert.assertEquals(textBoxControl.getText(), "Aspose.Words test");
textBoxControl.setText("Updated text");
Assert.assertEquals(textBoxControl.getText(), "Updated text");
value - A text of the control.protected java.lang.String getClsidVirtual()
getClsidVirtual in class OleControl