Object Model Reference : Classes : O : OutlineStyles : Methods : OutlineStyles.Add |
Function Add() As OutlineStyle
Member of OutlineStyles
The Add method adds a new outline style to the OutlineStyles collection.
• |
You can call the Save method after you modify the list of outline styles so that
the changes are available the next time you start CorelDRAW.
|
The following VBA example creates a new outline style and applies the new style to a line segment that is created on the active layer. After the style has been added to the OutlineStyles collection, it can be accessed through both the collection and the Outline Properties dialog box.
Sub Test() |
Dim s As Shape |
Dim stl As OutlineStyle |
Set stl = OutlineStyles.Add() |
stl.DashCount = 1 |
stl.DashLength(1) = 20 |
stl.GapLength(1) = 1 |
OutlineStyles.Save |
Set s = ActiveLayer.CreateLineSegment(0, 0, 5, 5) |
s.Outline.Width = 0.1 |
s.Outline.Style = stl |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.