Forms2OleControlType enumeration

Forms2OleControlType enumeration

Enumerates types of Forms 2.0 controls.

Members

NameDescription
OPTION_BUTTONA radio button control.
LABELA control that displays text.
TEXTBOXA control that allows the user to enter text.
CHECK_BOXA control that allows the user to select or deselect an option.
TOGGLE_BUTTONA control that allows the user to toggle between two states.
SPIN_BUTTONA control that allows the user to increase or decrease a value.
COMBO_BOXA control that allows the user to select an item from a list.
FRAMEA control that groups other controls.
MULTI_PAGEA control that displays multiple pages of content.
TAB_STRIPA control that allows the user to switch between multiple pages of content.
COMMAND_BUTTONA button that triggers an action when clicked.
IMAGEA control that displays an image.
SCROLL_BARA control that allows the user to scroll through content.
FORMA container for other controls.
LIST_BOXA control that displays a list of items.

Examples

Shows how to change state of the CheckBox control.

doc = aw.Document(file_name=MY_DIR + 'ActiveX controls.docx')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
check_box_control = shape.ole_format.ole_control.as_check_box_control()
check_box_control.checked = True
self.assertEqual(True, check_box_control.checked)
self.assertEqual(aw.drawing.ole.Forms2OleControlType.CHECK_BOX, check_box_control.type)

See Also