ChildNodes
Contents
[
Hide
]Forms2OleControl.ChildNodes property
Gets collection of immediate child controls.
public virtual Forms2OleControlCollection ChildNodes { get; }
Remarks
Returns null
if this control can not have children.
Examples
Shows how to verify the properties of an ActiveX control.
Document doc = new Document(MyDir + "ActiveX controls.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
OleControl oleControl = shape.OleFormat.OleControl;
Assert.That(oleControl.Name, Is.EqualTo("CheckBox1"));
if (oleControl.IsForms2OleControl)
{
Forms2OleControl checkBox = (Forms2OleControl)oleControl;
Assert.That(checkBox.Caption, Is.EqualTo("First"));
Assert.That(checkBox.Value, Is.EqualTo("0"));
Assert.That(checkBox.Enabled, Is.EqualTo(true));
Assert.That(checkBox.Type, Is.EqualTo(Forms2OleControlType.CheckBox));
Assert.That(checkBox.ChildNodes, Is.EqualTo(null));
Assert.That(checkBox.GroupName, Is.EqualTo(string.Empty));
// Note, that you can't set GroupName for a Frame.
checkBox.GroupName = "Aspose group name";
}
See Also
- class Forms2OleControlCollection
- class Forms2OleControl
- namespace Aspose.Words.Drawing.Ole
- assembly Aspose.Words