Object Model Reference : Classes : P : PatternCanvas : Properties : PatternCanvas.Index |
Property Index As Long
Member of PatternCanvas
The Index property returns the index number of a pattern canvas in the list of available patterns.
This property returns 0 if the pattern is not from the PatternCanvas collection.
The Index property returns a read-only value.
The following VBA example creates a sample tile of each available pattern fill.
Sub Test() |
Dim c As PatternCanvas |
Dim y As Long |
For Each c In PatternCanvases |
y = c.Index |
With ActiveLayer.CreateRectangle(0, (y - 1) / 2, 3, y / 2) |
.Fill.ApplyPatternFill cdrTwoColorPattern,, y |
End With |
Next c |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.