使用Golang通过C++用Aspose.Cells添加ActiveX控件
Contents
[
Hide
]
您可以使用 ShapeCollection::AddActiveXControl() 方法通过 Aspose.Cells 添加 ActiveX 控件。此方法接受一个参数 ControlType ,指定要在工作表中添加的 ActiveX 控件类型。其值如下:
- ControlType::CheckBox
- ControlType::ComboBox
- ControlType::CommandButton
- ControlType::Image
- ControlType::Label
- ControlType::ListBox
- ControlType::RadioButton
- ControlType::ScrollBar
- ControlType::SpinButton
- ControlType::TextBox
- ControlType::ToggleButton
- ControlType::Unknown
一旦在形状集合中添加了 ActiveX 控件,就可以通过 Shape::get_ActiveXControl() 方法访问 ActiveX 控件对象,并设置其各种属性。
以下示例代码使用 Aspose.Cells for C++ 添加了一个切换按钮 ActiveX 控件。