Previous Document Next Document
Segments.Item

Property Item(Index As Long) As Segment

Member of Segments

The Item property returns the specified Segment.

The Item property is the default property, and its reference can be omitted when referencing items in the collection. For example, Segments.Item(2) is the same as Segments(2) — they both reference the second segment object in the Segments collection.

The Item property returns a read-only value.

Parameters
Description
Index
Specifies the Segment by its index number

The following code example converts all segments in the curve to curve segments:

Sub Test() 
 Dim i As Long 
 For i = 1 To ActiveShape.Curve.Segments.Count 
  ActiveShape.Curve.Segments(i).Type = cdrCurveSegment 
 Next i 
End Sub 
Sub Test() 
 Dim seg As Segment 
 For Each seg In ActiveShape.Curve.Segments 
  seg.Type = cdrCurveSegment 
 Next seg 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.