Author Topic: Properties: HighlightColor and HighlightKeyCharacter?  (Read 2876 times)

qwideman

  • Newbie
  • *
  • Posts: 41
    • View Profile
Properties: HighlightColor and HighlightKeyCharacter?
« on: September 04, 2013, 10:42:09 AM »
How can I use the pipe component's properties: HighlightColor and HighlightKeyCharacter either in advanced HMI or with code?

Quinton

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Properties: HighlightColor and HighlightKeyCharacter?
« Reply #1 on: September 04, 2013, 10:52:42 AM »
The code for that is not actually implemented correctly. If you open pipe.vb and go to about line 50, then change to the code below, it will give you a highlight effect by changing the font color when a KeyCharacter is found in Text. You can then link the text to a string in the PLC using PLCAddressText.

Code: [Select]
                '* Highlight in red if an exclamation mark is in text
                If InStr(value, _HighlightKeyChar) > 0 Then
                    If MyBase.ForeColor <> _Highlightcolor Then SavedBackColor = MyBase.ForeColor
                    MyBase.ForeColor = _Highlightcolor
                Else
                    If SavedBackColor <> Nothing Then MyBase.ForeColor = SavedBackColor
                End If

qwideman

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Properties: HighlightColor and HighlightKeyCharacter?
« Reply #2 on: September 04, 2013, 11:18:12 AM »
Thanks