AdvancedHMI Software

General Category => Support Questions => Topic started by: scott.clark on October 21, 2015, 10:58:41 AM

Title: How to use MessageDisplayByValue IniFileName property
Post by: scott.clark on October 21, 2015, 10:58:41 AM
I would like to define my messages for the MessageDisplayByValue  control in a text file.

Does it support individual BackColor for each message?

What is the structure of the file?

is the file to have a .ini or .txt extension?

When specifying the property IniFileName property, do you include the file extension?

Is there a way to export an existing message collection to create the .ini file?

Thanks!
Title: Re: How to use MessageDisplayByValue IniFileName property
Post by: Archie on October 21, 2015, 12:54:12 PM
This is the files format:

1,Motor Overloaded
2,UnderLayer Side Saftey Door Open -OR- Material Choke in Screw Feed
3,UL Carrier Alarm,Red
4,FM Carrier Alarm,Red
5,Poke or Level Alarm
6,Auto Checker Alarm
7,Press Alarm,Red

I usually create them as a .txt file, but I do believe it will also accept any extension. You do have to specify the extension in the IniFileName property

This is the technique I use:

- Right click the AdvancedHMI project in Solution Explorer and select Add->New Item
- From the list select Text file
- Enter the alarms in the file
- With the alarm file selected in Solution Explorer, go to the Properties Window
- Set CopyToOutputDirectory to Copy if Newer
- Select the MessageDisplayByValue and set the IniFileName property to the name of the text file


Unfortunately there is no easy way to transfer existing messages into a Text file.
Title: Re: How to use MessageDisplayByValue IniFileName property
Post by: bachphi on October 12, 2018, 01:19:38 PM
As of v399yBeta12, its latest format:

1, Description go here, [BackgroundColor], [ForegroundColor], [BlinkerBoolean]

This site is also useful to select color:

http://www.flounder.com/csharp_color_table.htm
Title: Re: How to use MessageDisplayByValue IniFileName property
Post by: bachphi on August 31, 2023, 11:41:27 AM
I just noticed the wiki page does not have the MesssageDisplayByValue.  Would you please add it in. TIA.

https://advancedhmi.com/documentation/index.php/Special:AllPages