AdvancedHMI Software
General Category => Support Questions => Topic started by: bachphi on September 10, 2015, 11:16:19 AM
-
I tried the following without success:
Private Sub MessageDisplayByValue1_TextChanged(sender As Object, e As EventArgs) Handles MessageDisplayByValue1.TextChanged
MessageDisplayByValue1.HighlightColor = Color.Yellow
End Sub
-
The MessageDisplayByValue doesn't support flashing. It would take a bit of code modification to add that functionality. You can change background color on a per message basis.
The highlight property is used to change the backgound color based on a certain character found in the message string.
-
To change the background color per message basis:
Private Sub MessageDisplayByValue1_ValueChanged(sender As Object, e As AdvancedHMI.Controls.ValueChangedEventArgs) Handles MessageDisplayByValue1.ValueChanged
If MessageDisplayByValue1.Value = 1 Then
MessageDisplayByValue1.BackColor = Color.Blue
End If
If MessageDisplayByValue1.Value = 2 Then
MessageDisplayByValue1.BackColor = Color.Yellow
End If
End Sub
-
When you add the messages, you set the BackColor property. If you are setting the messages with an INI file, then you add the color like this:
0,No Messages
1,My Message for 1,Red
2,Another message,Blue
-
I see, I was using the the default Alarm.txt, it did not have that color feature. thanks