AdvancedHMI Software

General Category => Support Questions => Topic started by: qwideman on September 04, 2013, 10:42:09 AM

Title: Properties: HighlightColor and HighlightKeyCharacter?
Post by: qwideman 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
Title: Re: Properties: HighlightColor and HighlightKeyCharacter?
Post by: Archie 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
Title: Re: Properties: HighlightColor and HighlightKeyCharacter?
Post by: qwideman on September 04, 2013, 11:18:12 AM
Thanks