Previous Document Next Document
OutlineStyles.Item

Property Item(Index As Long) As OutlineStyle

Member of OutlineStyles

The Item property returns the specified outline style from the collection.

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

The Item property returns a read-only value.

Parameters
Description
Index
Specifies the style of outline by its index number

The following code example applies a dotted outline style (the second option in the Style list of the Outline Properties dialog box) to the selected shape:

Sub Test() 
 ActiveShape.Outline.Style = OutlineStyles(2) 
End Sub 
The following code example creates a sample of each available outline 
style by creating lines and applying a style to each one in turn. 
Sub Test() 
 Dim d As Document 
 Dim s As Shape 
 Dim stl As OutlineStyle 
 Dim y As Double 
 Set d = CreateDocument() 
 For Each stl In OutlineStyles 
  y = stl.Index * 0.3 
  Set s = d.ActiveLayer.CreateLineSegment(0, y, 5, y) 
  s.Outline.Width = 0.01 
  s.Outline.Style = stl 
 Next stl 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.