Object Model Reference : Classes : O : OutlineStyles : Properties : OutlineStyles.Item |
Property Item(Index As Long) As OutlineStyle
Member of OutlineStyles
The Item property returns a specified outline style from an OutlineStyles collection.
Item is the default property of the OutlineStyles class, and its reference can be omitted when you are accessing items in an OutlineStyles collection. For example, OutlineStyles.Item(2) is the same as OutlineStyles(2) they both reference the second outline style object in the collection.
The Item property returns a read-only value.
The following VBA 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 VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.