Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TAdvCardList
Using HTML template items in TDBAdvCardList
Using HTML template items in TDBAdvCardList
In CardTemplate.Items[index].ItemType , you can now set the type to itHTMLText. You can use CardTemplate.Items[index].HTMLTemplate to set the template for the HTML text for the item. DB fields are invoked via <#FIELDNAME> in the template. Other than this, HTML tags can be used described at https://www.tmssoftware.com/site/minihtml.asp
Example:
When TDBAdvCardList is bound to a dataset containing cars that has the fields BRAND, TYPE, CC and PK, these can be combined into on card item in TDBAdvCardList by setting the template to:
'Car:<b><#BRAND></b><BR><#TYPE> Engine: cc:<FONT COLOR="clBlue"><#CC></FONT>/pk:<FONT COLOR="clGreen"><#PK></FONT>'
Combined with setting the CaptionField to BRAND and add an item directly connected to PRICE and COUNTRY fields, the result is: