Determination of Color Value
The color is displayed in RGB format (Red, Green, Blue). Specify the corresponding decimal
value for each of the three RGB values (value range from 0 to 255).
Use VBA function "RGB" to assign a color to a property. The color "red", for example, is
represented as follows: RGB(255, 0, 0)
Example:
The "ButtonConfiguration()" procedure accesses the properties of the button. In this example
the font color when the flash status is "Off" will be set to "Red":
Sub ButtonConfiguration()
'VBA519
Dim objButton As HMIButton
Set objButton = ActiveDocument.HMIObjects.AddHMIObject("Button1", "HMIButton")
With objButton
.ForeFlashColorOff = RGB(255, 0, 0)
End With
End Sub
See also
CheckBox Object (Page 1827)
TextList Object (Page 1964)
StaticText Object (Page 1956)
OptionGroup Object (Page 1916)
IOField Object (Page 1886)
GroupDisplay Object (Page 1874)
Button Object (Page 1824)
BarGraph Object (Page 1819)
ForeFlashColorOn Property
Description
Defines or returns the color of the text for flash status "On". LONG write-read access.
Determination of Color Value
The color is displayed in RGB format (Red, Green, Blue). Specify the corresponding decimal
value for each of the three RGB values (value range from 0 to 255).
Use VBA function "RGB" to assign a color to a property. The color "red", for example, is
represented as follows: RGB(255, 0, 0)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2133