API Documentation > CorelDRAW > 2025-v26 > PatternCanvas > IVGPatternCanvas
PatternCanvas.Select method
Sets the image from preset image list
Syntax:
Sub Select(ByVal Index As Long)
Parameters:
Name Type Description
Index
Long
Remarks:
The Select method chooses a specific pattern canvas from the PatternCanvases collection (that is, the list of available two-color fill patterns).
Examples:
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