Object Model Reference : Classes : S : Shape : Properties : Shape.PowerClipParent |
Property PowerClipParent As Shape
Member of Shape
The PowerClipParent property returns a shape that represents the PowerClip container for a given shape.
The PowerClipParent property returns a read-only value.
The following VBA example fills each shape in the current PowerClip container with a lighter tint of the color of the PowerClip container.
Sub Test() |
Dim s As Shape |
Dim c As New Color |
If ActiveShape Is Nothing Then |
MsgBox "Select a powerclip container" |
Exit Sub |
End If |
If ActiveShape.Fill.Type <> cdrUniformFill Then |
MsgBox "Powerclip container must have a uniform fill" |
Exit Sub |
End If |
For Each s In ActiveShape.PowerClip.Shapes |
c.CopyAssign s.PowerClipParent.Fill.UniformColor |
Select Case c.Type |
Case cdrColorRGB |
c.RGBBlue = (c.RGBBlue + 255) \ 2 |
c.RGBGreen = (c.RGBGreen + 255) \ 2 |
c.RGBRed = (c.RGBRed + 255) \ 2 |
Case cdrColorCMYK |
c.CMYKBlack = c.CMYKBlack \ 2 |
c.CMYKCyan = c.CMYKCyan \ 2 |
c.CMYKMagenta = c.CMYKMagenta \ 2 |
c.CMYKYellow = c.CMYKYellow \ 2 |
Case Else |
c.ConvertToHLS |
c.HLSLightness = (c.HLSLightness + 255) \ 2 |
End Select |
s.Fill.ApplyUniformFill c |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.