API Documentation > CorelDRAW > 2025-v26 > PowerClip > IVGPowerClip
PowerClip.ContentsLocked property
Gets or sets whether to lock the contents of the powerclip
Syntax:
Property Get ContentsLocked() As Boolean
Property Let ContentsLocked(ByVal Value As Boolean)
Remarks:
The ContentsLocked property determines whether to lock the contents of a PowerClip object. When the contents of a PowerClip object are locked, moving the container moves its contents. The contents of the PowerClip object are locked when the ContentsLocked property is set to True.
Examples:
The following VBA example creates 150 randomly colored circles, places them inside a text shape, and attaches the contents of the PowerClip object to the text.
Sub Test()
Dim sr As New ShapeRange
Dim s As Shape, n As Long
For n = 1 To 150
  Set s = ActiveLayer.CreateEllipse2(Rnd() * 4, Rnd() * 2, Rnd() * 0.3)
  s.Fill.UniformColor.RGBAssign Rnd() * 256, Rnd() * 256, Rnd() * 256
  sr.Add s
Next n
Set s = ActiveLayer.CreateArtisticText(0, 0, "Clip")
With s.Text.FontProperties
  .Name = "Arial Black"
  .Size = 150
End With
sr.AddToPowerClip s
s.PowerClip.ContentsLocked = True 
End Sub