Yunqa • The Delphi Inspiration

Delphi Components and Applications

User Tools

Site Tools


products:htmllabel:index

Differences

This shows you the differences between two versions of the page.


products:htmllabel:index [2022/02/04 16:59] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== DIHtmlLabel ======
  
 +{{page>header}}
 +
 +===== Overview =====
 +
 +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: αβγ = αβγ.
 +
 +<WRAP clear/>
 +
 +===== Display HTML as Unicode =====
 +
 +Display of Unicode text is the main new feature of TDIHtmlLabel. This has become possible by applying [[products:htmlparser:|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.
 +
 +{{ dihtmllabel_demo.gif |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: Named and hex (#01AFaf) color values are recognized. |
 +| ''<I>''              | //Italic Text Style// |
 +| ''<S>''              | <del>Strike-through Text Style</del> |
 +| ''<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, [[products:htmlparser:|DIHtmlParser]] is required for the low level HTML reading and parsing.
 +
 +[[products:htmlparser:|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.
 +
 +{{tag>Controls Freeware HTML Label Text TLabel}}