Previous Document Next Document

Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.Select


PatternCanvas.Select

Sub Select(Index As Long)

Description

Member of PatternCanvas

The Select method chooses a specific pattern canvas from the PatternCanvases collection (that is, the list of available two-color fill patterns).

Parameter
Description
Index
Specifies the desired pattern canvas in the PatternCanvases collection

VBA example

The following VBA example selects the next pattern fill for each object with a two-color pattern fill.

Sub Test()
 Dim s As Shape
 Dim c As PatternCanvas
 For Each s In ActivePage.Shapes
  If s.Fill.Type = cdrPatternFill Then
   If s.Fill.Pattern.Type = cdrTwoColorPattern Then
    If s.Fill.Pattern.Canvas.Index <> PatternCanvases.Count Then
     Set c = New PatternCanvas
     c.Select s.Fill.Pattern.Canvas.Index + 1
     s.Fill.Pattern.Canvas = c
    End If
   End If
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.