ToggleButtonActiveXControl class

ToggleButtonActiveXControl class

Represents a ToggleButton ActiveX control.

Inheritance: ToggleButtonActiveXControlActiveXControlActiveXControlBase

The ToggleButtonActiveXControl type exposes the following members:

Properties

PropertyDescription
workbookGets the ActiveXControlBase.workbook object.
typeGets the type of the ActiveX control.
widthGets and sets the width of the control in unit of points.
heightGets and sets the height of the control in unit of points.
mouse_iconGets and sets a custom icon to display as the mouse pointer for the control.
mouse_pointerGets and sets the type of icon displayed as the mouse pointer for the control.
fore_ole_colorGets and sets the ole color of the foreground.
back_ole_colorGets and sets the ole color of the background.
is_visibleIndicates whether this control is visible.
shadowIndicates whether to show a shadow.
linked_cellGets and sets the linked cell.
list_fill_rangeGets and sets the list fill range.
dataGets and sets the binary data of the control.
is_enabledIndicates whether the control can receive the focus and respond to user-generated events.
is_lockedIndicates whether data in the control is locked for editing.
is_transparentIndicates whether the control is transparent.
is_auto_sizeIndicates whether the control will automatically resize to display its entire contents.
ime_modeGets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.
fontRepresents the font of the control.
text_alignRepresents how to align the text used by the control.
captionGets and set the descriptive text that appears on a control.
picture_positionGets and set the location of the control’s picture relative to its caption.
special_effectGets and sets the special effect of the control.
pictureGets and sets the data of the picture.
acceleratorGets and sets the accelerator key for the control.
valueIndicates if the control is checked or not.
is_triple_stateIndicates how the specified control will display Null values.

Example

from aspose import pycore
from aspose.cells import Workbook
from aspose.cells.drawing.activexcontrols import ControlType, ToggleButtonActiveXControl

# Initialize a new workbook.
book = Workbook()
# Add a ToggleButtonActiveXControl.
shape = book.worksheets[0].shapes.add_active_x_control(ControlType.TOGGLE_BUTTON, 1, 0, 1, 0, 100, 50)
activeXControl = pycore.cast(ToggleButtonActiveXControl, shape.active_x_control)
# do your business
# Save the excel file.
book.save("exmaple.xlsx")

See Also