//鼠标悬停线条

WinCC改变前景色

Function ForeColor_Trigger(ByVal Item)
Dim changer
Set changer = ScreenItems("B_PASV01")

Dim tag
Set tag = HMIRuntime.Tags("离散")

If tag.read = 1 Then
changer.ForeColor = RGB(0,255,0) ' 设置前景色为绿色
Elseif tag.read = 0 Then
changer.ForeColor = RGB(255,0,0) ' 设置前景色为红色
End If

End Function

posted @ 2024-12-31 11:20  Hi!JiQun  阅读(95)  评论(0)    收藏  举报