Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

IObjectView​.BackgroundColor [Property][Get/Set]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets or Sets the background color of the ObjectView. This number is treated as an OLE_COLOR inside the Process Analyst.

Defined As

  • [VBA] Long BackgroundColor

  • [Cicode] INT BackgroundColor

  • [C++] OLE_COLOR BackgroundColor

Execution Result

If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument.

Remarks

The color value can be calculated using the following formula: color = (65536 * Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.

Calling Syntax

This example assumes that there is an IObjectView object being passed in as a parameter.

[VBA]

Sub Example(objectView As Object)
Dim backgroundColor As Long
`Getting Property value
backgroundColor = objectView.BackgroundColor
`Setting Property value to red
objectView.BackgroundColor = 255
End Sub

[Cicode]

FUNCTION Example(OBJECT hObjectView)
// Getting property value
INT nBackgroundColor =
_ObjectGetProperty(hObjectView,"BackgroundColor");
// Setting Property to Red
_ObjectSetProperty(hObjectView, "BackgroundColor", 255);
END

In This Topic
TitleResults for “How to create a CRG?”Also Available in