Type
TextBoxControl.Type property
获取 Forms 2.0 控件的类型。
public override Forms2OleControlType Type { get; }
例子
展示如何更改 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);
也可以看看
- enum Forms2OleControlType
- class TextBoxControl
- 命名空间 Aspose.Words.Drawing.Ole
- 部件 Aspose.Words