GefFillFormat.TwoColorGradient (method)

Sets the fill style to a gradient fill based on two colors.
Syntax: object.TwoColorGradient Style, GradVariant, Shades
Parameters:
GradVariant As GefGradientVariantEnum -
Optional Shades As long -
Description: Sets the Type of the fill to GefFillGradient and the GradientColorType to GefGradientTwoColor.

Shades:
The Shades argument is retained only for backward compatibility and does not affect the fill.

Previous Versions:
The Shades parameter 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.

Example:

Sub FillFormat_TwoColorGradient()
    
    Dim oCimObj As GefObject
    Dim oCimFillFmt As GefFillFormat
    
    Set oCimObj = CimGetObject
    Set oCimFillFmt = oCimObj.Fill
    
    oCimFillFmt.TwoColorGradient gefGradientFromCenter, _
        gefGradientVar1, 30
    CimGetScreen.Refresh False
    
End Sub