Previous Document Next Document
Document.ShapeEnumDirection

Property ShapeEnumDirection As cdrShapeEnumDirection

Member of Document

The ShapeEnumDirection property returns or sets how shapes in the Shapes collection are enumerated. By default, the last created shape has the index of 1; that is, it is accessible as Shapes(1), and the value is set to cdrShapeEnumTopFirst. If the value is set to cdrShapeEnumBottomFirst, the first created shape has the index of 1.

The following code example creates an ellipse, and then it creates an artistic text object in a new document and applies a red fill to the ellipse (the bottommost object).

Sub Test() 
 Dim d As Document 
 Set d = CreateDocument 
 d.ShapeEnumDirection = cdrShapeEnumBottomFirst 
 d.ActiveLayer.CreateEllipse2 4, 4, 2 
 d.ActiveLayer.CreateArtisticText 0, 0, "Text" 
 d.ActiveLayer.Shapes(1).Fill.UniformColor.RGBAssign 255, 0, 0 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.