GefFillFormat.GradientShades (read-only property)

Gets the number of shades used in the gradient as a long.
Syntax: VARIANT = object.GradientShades
Description: This property is retained only for backward compatibility and does not affect the fill.

For Previous versions:
This property determines how many shades are used in the transition from one color to the other. The higher the number, the smoother the transition will be. Using large values may negatively impact performance. CimEdit uses a default value of 64.

This property gets set with the OneColorGradient and TwoColorGradient methods.

This property is only valid if the Type of the GefFillFormat is GefFillGradient.


Sub FillFormat_GradientShades()
    Dim oCimObj As GefObject
    Dim oCimFillFmt As GefFillFormat
    Set oCimObj = CimGetObject
    Set oCimFillFmt = oCimObj.Fill
    If Not oCimFillFmt Is Nothing Then
        Select Case oCimFillFmt.Type
            Case gefFillMixedValue
                MsgBox "The type is unknown or is not set"
            Case gefFillNone
                MsgBox "The selected object is not filled"
            Case gefFillSolid
                MsgBox "The selected object is solid"
            Case gefFillPattern
                MsgBox "The selected object is using a pattern"
            Case gefFillGradient
                MsgBox "The selected object is using a gradient"
                MsgBox "The number of gradient shades is " & _
        End Select
    End If
End Sub