返回
Shape 对象,它代表子形状或子形状区域的共同父形状。
语法
表达式.ParentGroup
表达式 一个代表 ShapeRange 对象的变量。
示例
在此示例中,ET 向活动工作表添加两个形状,然后通过删除组合的父形状来删除这两个形状。
示例代码 |
function ParentGroup() {
let myShape = ActiveSheet.Shapes
myShape.AddShape(1, 10, 10, 100, 100)
myShape.AddShape(2, 110, 120, 100, 100)
myShape.Range([1, 2]).Group()
// Using the child shape in the group get the Parent shape.
let pgShape = ActiveSheet.Shapes.Item(1).GroupItems.Item(1).ParentGroup
MsgBox("The two shapes will now be deleted.")
// Delete the parent shape.
pgShape.Delete()
}
|