Forms2OleControlType

Forms2OleControlType enumeration

Enumerates types of Forms 2.0 controls.

public enum Forms2OleControlType

Values

NameValueDescription
OptionButton0A radio button control.
Label1A control that displays text.
Textbox2A control that allows the user to enter text.
CheckBox3A control that allows the user to select or deselect an option.
ToggleButton4A control that allows the user to toggle between two states.
SpinButton5A control that allows the user to increase or decrease a value.
ComboBox6A control that allows the user to select an item from a list.
Frame7A control that groups other controls.
MultiPage8A control that displays multiple pages of content.
TabStrip9A control that allows the user to switch between multiple pages of content.
CommandButton10A button that triggers an action when clicked.
Image11A control that displays an image.
ScrollBar12A control that allows the user to scroll through content.
Form13A container for other controls.
ListBox14A control that displays a list of items.

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