Technical Reference > Graphics Builder Automation Interface > Object Drawing and Property Functions > AttributeGradientMode

AttributeGradientMode

Sets or retrieves the direction of the gradient on the General| Appearance tab of the Object Properties dialog for the current object.

This function is only supported on rectangle objects.

Syntax

AttributeGradientMode(Mode)

Mode:

Direction of the gradient:

0 - Off

1 - Left To Right

2 - Right To Left

3 - Top To Bottom

4 - Bottom To Top

5 - Horizontal Edge To Middle

6 - Middle To Horizontal Edge

7 - Vertical Edge To Middle

8 - Middle To Vertical Edge

Return Value

If retrieving the gradient mode, the direction of the gradient as specified above. If applying a gradient mode, 0 (zero) if successful. In both cases, an error is returned if unsuccessful. If values are out of range on writing to the attribute, the function will exit and report the error E_INVALIDARG. If there is no active object, they will exit and report a return value of E_HANDLE.