CheckBoxControl
Contents
[
Hide
]CheckBoxControl class
The CheckBox control toggles a value.
public class CheckBoxControl : MorphDataControl
Properties
Name | Description |
---|---|
BackColor { get; set; } | Gets or sets a background color of the control. The default value depends on a type of the control. |
Caption { get; set; } | Gets or sets a Caption property of the control. Default value is an empty string. |
Checked { get; set; } | Gets or sets a boolean value indicating either this CheckBoxControl is checked or not. The default value is false . |
virtual ChildNodes { get; } | Gets collection of immediate child controls. |
Enabled { get; } | Returns true if control is in enabled state. |
ForeColor { get; set; } | Gets or sets a foreground color of the control. The default value depends on a type of the control. |
GroupName { get; set; } | Gets or sets a string that specifies a group of mutually exclusive controls. The default value is an empty string. |
Height { get; set; } | Gets or sets a height of the control in points. |
IsForms2OleControl { get; } | Returns true if the control is a Forms2OleControl . |
Name { get; set; } | Gets or sets name of the ActiveX control. |
override Type { get; } | Gets type of Forms 2.0 control. |
Value { get; } | 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. |
Width { get; set; } | Gets or sets a width of the control in points. |
Remarks
It has three possible states: selected, cleared, and neither selected nor cleared, meaning a combination of on and off states.
Examples
Shows how to change state of the CheckBox control.
Document doc = new Document(MyDir + "ActiveX controls.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.OleFormat.OleControl;
checkBoxControl.Checked = true;
Assert.AreEqual(true, checkBoxControl.Checked);
Assert.AreEqual(Forms2OleControlType.CheckBox, checkBoxControl.Type);
See Also
- class MorphDataControl
- namespace Aspose.Words.Drawing.Ole
- assembly Aspose.Words