AdvancedHMI Software

General Category => Support Questions => Topic started by: bachphi on September 10, 2015, 11:16:19 AM

Title: MessageDisplayByValue: Can I make the text inside flashing?
Post by: bachphi on September 10, 2015, 11:16:19 AM
I tried the following without success:

Code: [Select]
Private Sub MessageDisplayByValue1_TextChanged(sender As Object, e As EventArgs) Handles MessageDisplayByValue1.TextChanged
        MessageDisplayByValue1.HighlightColor = Color.Yellow
    End Sub
Title: Re: MessageDisplayByValue: Can I make the text inside flashing?
Post by: Archie on September 10, 2015, 11:27:42 AM
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.
Title: Re: MessageDisplayByValue: Can I make the text inside flashing?
Post by: bachphi on September 10, 2015, 11:56:25 AM
To change the background color per message basis:
Code: [Select]
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
Title: Re: MessageDisplayByValue: Can I make the text inside flashing?
Post by: Archie on September 10, 2015, 12:00:09 PM
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
Title: Re: MessageDisplayByValue: Can I make the text inside flashing?
Post by: bachphi on September 10, 2015, 12:02:07 PM
I see, I was using the the default Alarm.txt, it did not have that color feature. thanks