Text
TextBoxControl.Text property
获取或设置控件的文本。
public string Text { get; set; }
例子
展示如何更改 TextBox OLE 控件的文本。
Document doc = new Document(MyDir + "Textbox control.docm");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
TextBoxControl textBoxControl = (TextBoxControl)shape.OleFormat.OleControl;
Assert.AreEqual("Aspose.Words test", textBoxControl.Text);
textBoxControl.Text = "Updated text";
Assert.AreEqual("Updated text", textBoxControl.Text);
Assert.AreEqual(Forms2OleControlType.Textbox, textBoxControl.Type);
也可以看看
- class TextBoxControl
- 命名空间 Aspose.Words.Drawing.Ole
- 部件 Aspose.Words