Previous Document Next Document
PowerClip.ContentsLocked

Property ContentsLocked As Boolean

Member of PowerClip

The ContentsLocked property determines whether the contents of a PowerClip are locked to its container. If the contents are locked, moving the container moves the shapes inside the PowerClip.

If the ContentsLocked property is True, the PowerClip contents are locked.

The following code example creates 150 randomly colored circles, places them inside a text shape, and attaches the contents of the PowerClip 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.