Previous Document Next Document

Object Model Reference : Classes : O : OutlineStyles : Properties : OutlineStyles.Item


OutlineStyles.Item

Property Item(Index As Long) As OutlineStyle

Description

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.

Parameter
Description
Index
Specifies an outline style by its index number

VBA example 1

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
VBA example 2
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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.