I have a component that is a read-only field that I want to color based on it's object's value.
Is this possible to color code a read-only field?
I have the Event on Primary that uses a Method Call to choose the value, and a Form Script as below.
This script is not working, but a sample of what I am trying to accomplish.
Sub Div900()
Dim sDivision As String
Dim oCache As IWSIDOCollection
oCache = ThisForm.PrimaryIDOCollection
sDivision = oCache.GetCurrentObjectProperty("Uf_RPC_DivisionFlag")
If ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("Uf_RPC_DivisionFlag") = "900" Then
ThisForm.Components("Uf_RPC_DivisionFlag").ForegroundColor = "136,168,115"
Else
ThisForm.Components("Uf_RPC_DivisionFlag").ForegroundColor = "255,0,0"
End If
End Sub