TDIHtmlLabel replaces TLabel to output text with simple HTML formatting like clickable links, font color, and font style. Simply use the Caption property, just as you usually do with TLabel. To format text and links, use common HTML tags and character entities.
The TDIHtmlLabel component is fully Unicode compatible and can display international characters like Cyrillic and Greek using common HTML entities: αβγ = αβγ.
Display of Unicode text is the main new feature of TDIHtmlLabel. This has become possible by applying DIHtmlParser as the underlying HTML parsing engine. TDIHtmlLabel displays international Unicode characters from different languages starting as early as Win95 – provided that the applied font supports the required characters glyphs. DIHtmlLabel reads Unicode by converting standard HTML entities, both named and numeric, to UnicodeStrings internally.
Tag recognition in DIHtmlLabel is case insensitive, just like in HTML:
<B> is trated the same way as
<b>. Both single (
') and double (
“) quotes are supported around attribute values, but may also be omitted.
Basic Text Formatting
| ||Bold Text Style|
| ||Colored Text Style: Named and hex (#01AFaf) color values are recognized.|
| ||Italic Text Style|
| ||Underlined Text Style|
Line and Paragraph Breaks
| ||Line Break (no end tag required)|
| ||Paragraph Break (no end tag required)|
| ||Hypertext Links. The OnLinkClick event handler fires, making it easy for you to perform any action you want.|
| ||Dynamic content may not be known when you design the form, or content that changes during the course of time, such as a label reporting memory usage.|
DIHtmlLabel includes full source code for the component and demo application. To compile, DIHtmlParser is required for the low level HTML reading and parsing.
DIHtmlParser is available as a separate package on this site, so make sure to download it before you recompile the demo application or write your own.