Skip to content
本页内容

Type (属性)

返回代表填充类型的 MsoFillType 值。

说明

此属性也可返回 xlAutomaticxlNone

在 ET 中不使用 msoFillBackground常量。

示例

python
#本示例判断活动工作表中第二个形状的填充类型是否是纹理填充
def test():
    fillFormat = ActiveSheet.Shapes.Item(2).Fill
    if fillFormat.Type == msoFillTextured:
        print("是纹理填充")
    else:
        print("不是纹理填充")
python
#本示例显示第一张工作表中第一个形状的填充类型是否是实心填充
def test():
    fillFormat = Application.Worksheets.Item(1).Shapes.Item(1).Fill
    print(fillFormat.Type == msoFillSolid)