Author Topic: MessageDisplayByValue: Can I make the text inside flashing?  (Read 1518 times)

bachphi

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
MessageDisplayByValue: Can I make the text inside flashing?
« 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
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: MessageDisplayByValue: Can I make the text inside flashing?
« Reply #1 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.

bachphi

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: MessageDisplayByValue: Can I make the text inside flashing?
« Reply #2 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
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: MessageDisplayByValue: Can I make the text inside flashing?
« Reply #3 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

bachphi

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: MessageDisplayByValue: Can I make the text inside flashing?
« Reply #4 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
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================