A lot of components in Ignition accept HTML. Using some basic HTML can really step up your project to a new level.
The Label component is one of the components that accepts HTML, making it very versatile. A label can display text, images, or both. The text can be HTML formatted. Here are the steps to add HTML to a label:
- Open the Ignition Designer and drag the Label component from the Display tab of the Component Palette.
- The Label component has a Text property for what is displayed. By default the text is a single line. We can add HTML to make the label multi-line, bold certain text, underline certain text and more. Set the text property to the following:
<HTML>First Line<BR>Second Line
The label now has two lines.
The Button component also accepts HTML:
- Open the Ignition Designer and drag the Button component from the Buttons tab of the Component Palette.
- The Button component also has a Text property for what is displayed. By default the text is a single line. Set the text property to the following:
One of the most powerful places to use HTML is on the Mouseover Text property that exists on every component. The Mouseover Text is the text that is displayed in the tooltip, which pops up on mouseover of the component. You can display information about the component or the signal it is bound to. Let's add HTML to the mouseover text of the label component we created in the first example above:
- Set the Mouseover Text property to the following:
<HTML>Instructions<BR><UL><LI>Step 1</LI><LI>Step 2</LI><LI>Step 3</LI></UL>
- Open the client (runtime) and hover your mouse over the component to see the tooltip.
Another place you can add HTML is the Table component. You can add HTML to the header row or to each of the individual cells of the table. Let's add HTML to the header:
- Open the Ignition Designer and drag the Table component from the Tables tab of the Component Palette.
- In the Property Editor, check the checkbox on the Test Data property to fill in some test data.
- To change the table's header we need to use the Table Customizer. Right click on the table and select Customizers > Table Customizer.
- In the header row you can add HTML to the display text in each column. Note *: If you are using line breaks, you must put them in the first visible column header to set the height. Set the header value of the first column to the following:
Now the table's header has multiple lines.
Feel free to experiment with other components to see if they accept HTML. You can combine HTML and the use of icons to really make your project stand out. As always, if you have any questions please feel free to call or email us.