Previous Document Next Document
PatternCanvas.Select

Sub Select(Index As Long)

Member of PatternCanvas

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

Parameters
Description
Index
Uniquely identifies a pattern canvas in the PatternCanvases collection of CorelDRAW

The following code 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 2007 Corel Corporation. All rights reserved.