Difference between revisions of "LMD VCL - MiniHTML"
(→Supported subset of HTML tags) |
m (→Supported subset of HTML tags) |
||
Line 80: | Line 80: | ||
| The ''aVarName'', ''aVarValue'' parameters are passed to the OnVariableNeeded event handler, which defines what value substitutes the tag<br> | | The ''aVarName'', ''aVarValue'' parameters are passed to the OnVariableNeeded event handler, which defines what value substitutes the tag<br> | ||
<br><br><code> | <br><br><code> | ||
− | procedure TForm2.LMDHTMLLabel1VariableNeeded(Sender: TObject; | + | procedure TForm2.LMDHTMLLabel1VariableNeeded(Sender: TObject; |
− | const aVarName: TLMDString; var aVarValue: TLMDString); | + | const aVarName: TLMDString; var aVarValue: TLMDString); |
− | begin | + | begin |
− | aVarValue := '1111'; | + | aVarValue := '1111'; |
end;<br> | end;<br> | ||
</code> | </code> | ||
|- | |- | ||
| Embedded controls | | Embedded controls | ||
− | |<control vclclass= width= height= name= | + | |<control vclclass= width= height= name=> |
|Allows embedding of any control into HTML text | |Allows embedding of any control into HTML text | ||
|} | |} |
Revision as of 16:25, 14 July 2011
<< Back to Getting started or Product Resources page
Supported subset of HTML tags
LMD 2007 shared Runtime (or better) integrates Mini HTML for controls with HTML support. Following subset of HTML tags are available:
Tag | Syntax | Comments & samples |
Bold | <b>, </b> | bold |
Italic | <i>, </i> | italic |
Underline | <u>, </u> | underline |
Strikeout | <strikeout>, </strikeout> or <s>, </s> | |
Paragraph | <p [align="left|right|center"]> | Use align parameter to specify the alignment of the text in the paragraph. Default value for align is "left". |
Subscript | <sub>, </sub> | Subscript text is drawn with smaller font and with baseline moved down. |
Superscript | <sup>, </sup> | Superscript text is drawn with smaller font and with baseline moved up. |
Unordered list of elements | <ul><li>item</li>...</ul> |
|
Ordered list of elements | <ol><li>item</li>...</ol> |
|
Horizontal divider | <hr [width="width"]> | If no value for width attribute is specified, then it will take maximum available value. |
Line break | <br> | |
Font | <font [name="fontname"] [size="x|+x|-x|x px"] [color={"#rrggbb"|"color name"}] [bgcolor={"#rrggbb"|"color name"}]>text</font> | You can specify the name of the font name, size (absolute size or increase, decrease of size)
and font background color. Color must be a valid hexadecimal value in common HTML format, valid VCL color identifier (clWhite, clBtnFace for example) or valid HTML color identifier (red, black, btnshadow for example. You can use background synonym for bgcolor attribute. |
Hyperlink | <a href="link">link text</a> | Link parameter value is passed to OnLinkClick event handler, present in some controls (not all controls support clicking on the URLs. |
Embedded image | <img src="image" [width="w"] [height="h"]> | The src parameter value is passed to the OnImageNeeded event handler. You can specify the width and height of the image rectangle if needed. By default the width and height are taken from the image you provide in event handler, but you can stretch image on drawing by specifying width and height explicitly. The simplest OnImageNeeded event handlers: |
Variables | <~~myVariable> | The aVarName, aVarValue parameters are passed to the OnVariableNeeded event handler, which defines what value substitutes the tag
const aVarName: TLMDString; var aVarValue: TLMDString); begin aVarValue := '1111'; end; |
Embedded controls | <control vclclass= width= height= name=> | Allows embedding of any control into HTML text |
Supported special symbols
Á | Á | ¢ | ¢ | Í | Í | ó | ó | ¹ | ¹ |
á | á | © | © | í | í | Ô | Ô | ² | ² |
 |  | ¤ | ¤ | Î | Î | ô | ô | ³ | ³ |
â | â | ° | ° | î | î | Ò | Ò | ß | ß |
´ | ´ | ÷ | ÷ | ¡ | ¡ | ò | ò | Þ | Þ |
Æ | Æ | É | É | Ì | Ì | ª | ª | × | × |
æ | æ | é | é | ì | ì | º | º | &trade | ™ |
À | À | Ê | Ê | ¿ | ¿ | Ø | Ø | Ú | Ú |
à | à | ê | ê | Ï | Ï | ø | ø | ú | ú |
& | & | È | È | ï | ï | Õ | Õ | Û | Û |
Å | Å | è | è | « | « | õ | õ | Ù | Ù |
å | å | Ð | Ð | < | < | Ö | Ö | ù | ù |
à | à | ð | ð | ¯ | ¯ | ö | ö | ¨ | ¨ |
ã | ã | Ë | Ë | µ | µ | ¶ | ¶ | Ü | Ü |
Ä | Ä | ë | ë | · | · | ± | ± | Ý | Ý |
ä | ä | &euro | € |   | £ | £ | ¥ | ¥ | |
¦ | ¦ | ½ | ½ | ¬ | ¬ | " | " | ||
Ç | Ç | ¼ | ¼ | Ñ | Ñ | » | » | ||
ç | ç | ¾ | ¾ | ñ | ñ | ® | ® | ||
¸ | ¸ | > | > | Ó | Ó | § | § |