Previous Document Next Document

Object Model Reference : Classes : T : TextureFillProperty : Properties : TextureFillProperty.Type


TextureFillProperty.Type

Property Type As cdrTexturePropertyType

Description

Member of TextureFillProperty

The Type property returns the type (numeric or color) of a property of a texture fill.

This property returns a read-only value of cdrTexturePropertyType.

VBA example

The following VBA example displays detailed information about the texture fill of a selected shape, including a list of its parameters and their values.

Sub Test()
 Dim s As Shape
 Dim tf As TextureFill
 Dim prop As TextureFillProperty
 Dim ss As String
 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 & "Parameter: "
 For Each prop In tf.Properties
  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 prop
 MsgBox ss
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.