[DIHtmlLabel]

DIHtmlLabel

DIHtmlLabel is a fast, lightweight replacement for Delphi's TLabel that handles HTML-formatted text, clickable text links and dynamic content. As a replacement for TLabel, it is easy to input text, even formatted text with links. Simply use the Caption property, just as you usually do with TLabel. To input formatted text and links, you must use the 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 HTML as Unicode

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 is able to display characters from different languages right next to each other even on Win95 – provided that the font applied supports the required characters glyphs. DIHtmlLabel reads Unicode by converting all standard HTML entities, both named and numeric, to Unicode WideStrings internally.

DIHtmlLabel Demo Application

Supported HTML Formatting

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

<B> Bold Text Style
<FONT color=red> Colored Text Style
<I> Italic Text Style
<S> Strike-through Text Style
<U> Underlined Text Style

Line and Paragraph Breaks

<BR> Line Break (no end tag required)
<P> Paragraph Break (no end tag required)

Special Features

<A href="MyLink"> Hypertext Links. The OnLinkClick event handler fires, making it easy for you to perform any action you want.
<DYNAMIC id="MyTag"> 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.

Requirements

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.

products/htmllabel/index.txt · Last modified: 2007/12/21 16:14 (external edit)