ToggleButtonActiveXControl类

ToggleButtonActiveXControl类

表示 ToggleButton ActiveX 控件。

继承: ToggleButtonActiveXControl

ToggleButtonActiveXControl 类型公开以下成员:

属性

属性描述
workbook
type获取 ActiveX 控件的类型。
width
height
mouse_icon
mouse_pointer
fore_ole_color
back_ole_color
is_visible
shadow
linked_cell
list_fill_range
data
is_enabled
is_locked
is_transparent
is_auto_size
ime_mode
font
text_align
caption获取并设置控件上显示的描述性文本。
picture_position获取并设置控件图片相对于其标题的位置。
special_effect获取和设置控件的特殊效果。
picture获取和设置图片的数据。
accelerator获取并设置控件的加速键。
value指示控件是否被选中。
is_triple_state指示指定的控件将如何显示空值。

例子

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")

也可以看看