Aspose::Cells::Drawing::ActiveXControls::ToggleButtonActiveXControl class

ToggleButtonActiveXControl class

Represents a ToggleButton ActiveX control.

class ToggleButtonActiveXControl : public Aspose::Cells::Drawing::ActiveXControls::ActiveXControl

Methods

MethodDescription
ActiveXControl(ActiveXControl_Impl* impl)Constructs from an implementation object.
ActiveXControl(const ActiveXControl& src)Copy constructor.
ActiveXControl(const ActiveXControlBase& src)Constructs from a parent object.
ActiveXControlBase(ActiveXControlBase_Impl* impl)Constructs from an implementation object.
ActiveXControlBase(const ActiveXControlBase& src)Copy constructor.
GetAccelerator()Gets and sets the accelerator key for the control.
GetBackOleColor()Gets and sets the ole color of the background.
GetCaption()Gets and set the descriptive text that appears on a control.
GetData()Gets and sets the binary data of the control.
GetFont()Represents the font of the control.
GetForeOleColor()Gets and sets the ole color of the foreground.
GetHeight()Gets and sets the height of the control in unit of points.
GetIMEMode()Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.
GetLinkedCell()Gets and sets the linked cell.
GetListFillRange()Gets and sets the list fill range.
GetMouseIcon()Gets and sets a custom icon to display as the mouse pointer for the control.
GetMousePointer()Gets and sets the type of icon displayed as the mouse pointer for the control.
GetPicture()Gets and sets the data of the picture.
GetPicturePosition()Gets and set the location of the control’s picture relative to its caption.
GetShadow()Indicates whether to show a shadow.
GetSpecialEffect()Gets and sets the special effect of the control.
GetTextAlign()Represents how to align the text used by the control.
virtual GetType()Gets the type of the ActiveX control.
GetValue()Indicates if the control is checked or not.
GetWidth()Gets and sets the width of the control in unit of points.
GetWorkbook()Gets the Workbook object.
IsAutoSize()Indicates whether the control will automatically resize to display its entire contents.
IsEnabled()Indicates whether the control can receive the focus and respond to user-generated events.
IsLocked()Indicates whether data in the control is locked for editing.
IsNull() constChecks whether the implementation object is nullptr.
IsTransparent()Indicates whether the control is transparent.
IsTripleState()Indicates how the specified control will display Null values.
IsVisible()Indicates whether this control is visible.
explicit operator bool() constoperator bool()
operator=(const ToggleButtonActiveXControl& src)operator=
operator=(const ActiveXControl& src)operator=
operator=(const ActiveXControlBase& src)operator=
SetAccelerator(char16_t value)Gets and sets the accelerator key for the control.
SetBackOleColor(int32_t value)Gets and sets the ole color of the background.
SetCaption(const U16String& value)Gets and set the descriptive text that appears on a control.
SetCaption(const char16_t* value)Gets and set the descriptive text that appears on a control.
SetForeOleColor(int32_t value)Gets and sets the ole color of the foreground.
SetHeight(double value)Gets and sets the height of the control in unit of points.
SetIMEMode(InputMethodEditorMode value)Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.
SetIsAutoSize(bool value)Indicates whether the control will automatically resize to display its entire contents.
SetIsEnabled(bool value)Indicates whether the control can receive the focus and respond to user-generated events.
SetIsLocked(bool value)Indicates whether data in the control is locked for editing.
SetIsTransparent(bool value)Indicates whether the control is transparent.
SetIsTripleState(bool value)Indicates how the specified control will display Null values.
SetIsVisible(bool value)Indicates whether this control is visible.
SetLinkedCell(const U16String& value)Gets and sets the linked cell.
SetLinkedCell(const char16_t* value)Gets and sets the linked cell.
SetListFillRange(const U16String& value)Gets and sets the list fill range.
SetListFillRange(const char16_t* value)Gets and sets the list fill range.
SetMouseIcon(const Vector <uint8_t>& value)Gets and sets a custom icon to display as the mouse pointer for the control.
SetMousePointer(ControlMousePointerType value)Gets and sets the type of icon displayed as the mouse pointer for the control.
SetPicture(const Vector <uint8_t>& value)Gets and sets the data of the picture.
SetPicturePosition(ControlPicturePositionType value)Gets and set the location of the control’s picture relative to its caption.
SetShadow(bool value)Indicates whether to show a shadow.
SetSpecialEffect(ControlSpecialEffectType value)Gets and sets the special effect of the control.
SetTextAlign(TextAlignmentType value)Represents how to align the text used by the control.
SetValue(CheckValueType value)Indicates if the control is checked or not.
SetWidth(double value)Gets and sets the width of the control in unit of points.
ToggleButtonActiveXControl(ToggleButtonActiveXControl_Impl* impl)Constructs from an implementation object.
ToggleButtonActiveXControl(const ToggleButtonActiveXControl& src)Copy constructor.
ToggleButtonActiveXControl(const ActiveXControl& src)Constructs from a parent object.
~ActiveXControl()Destructor.
~ActiveXControlBase()Destructor.
~ToggleButtonActiveXControl()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
//Initialize a new workbook.
Workbook book;

//Add a ToggleButtonActiveXControl.
Shape shape = book.GetWorksheets().Get(0).GetShapes().AddActiveXControl(ControlType::ToggleButton, 1, 0, 1, 0, 100, 50);
ToggleButtonActiveXControl activeXControl = (ToggleButtonActiveXControl)shape.GetActiveXControl();


//Save the excel file.
book.Save(u"exmaple.xlsx");
Aspose::Cells::Cleanup();

See Also