![]() |
![]() |
TextureFillProperties.Item
Property Item(IndexOrName As Variant) As TextureFillProperty
Member of TextureFillProperties
The Item property returns a TextureFillProperty object that represents a single parameter of a texture fill.
The Item property is the default property, and its reference can be omitted when accessing an items in the collection. For example, TextureFillProperties.Item(2)
is the same as TextureFillProperties(2)
they both reference the second TextureFillProperty in the TextureFillProperties collection.
Names of parameters are localized in international versions of CorelDRAW. If you choose to use parameter names, your macros might need to be revised for localized builds of CorelDRAW (such as German and French).
The Item property returns a read-only value.
Parameters
|
Description
|
IndexOrName
|
Specifies the property by its name or index number:
Index Acts as a preset placeholder for each object in the TextureFillProperties collection, uniquely identifying each member of the collection
Name Represents the unique string value that identifies each property
|
The following code example displays detailed information about the texture fill of a selected shape, including a list of all of the parameters and their values:
Sub Test() Dim s As Shape Dim tf As TextureFill Dim prop As TextureFillProperty Dim ss As String, i As Long Set s = ActiveShape If s Is Nothing Then MsgBox "Nothing selected" Exit Sub End If If s.Fill.Type <> cdrTextureFill Then MsgBox "Select a shape with texture fill" Exit Sub End If Set tf = s.Fill.Texture ss = "Texture Name: " & tf.TextureName & vbCr & "Library Name: " If tf.LibraryName = "" Then ss = ss & "Styles" Else ss = ss & tf.LibraryName End If ss = ss & vbCr & "Style Name: " & tf.StyleName & vbCr ss = ss & vbCr & "Parameters: " For i = 1 To tf.Properties.Count Set prop = tf.Properties(i) ss = ss & vbCr & prop.Name & " " If prop.Type = cdrTexturePropertyNumeric Then ss = ss & prop.Value Else ss = ss & "Color(" & prop.Value.Name(True) & ")" End If Next i MsgBox ss End Sub Sub Test() Dim s As Shape Dim tf As TextureFill Set s = ActiveLayer.CreateRectangle(0, 0, 2, 2) Set tf = s.Fill.ApplyTextureFill("Dark Cloud", "Samples 8") tf.Properties("Texture #:").Value = 78 End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.