Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TMS IntraWeb Component Pack ProTIWResponsiveList: How to use the ItemStyle parameter of the OnItemRender event
You can use the ItemStyle parameter of the OnItemRender event in the same way as the ItemStyle property of a list item. First add an item to the ItemStyles collection then use its name to apply the style to a specific list item.
Example to use a red font color for the first item in the list:
var
si: TIWItemStylesItem;
begin
si := TIWResponsiveList1.ItemStyles.Add;
si.ItemStyle.Font.Color := clWebRed;
si.Name := ''RedFont'';
procedure TformResponsiveList1.TIWResponsiveList1ItemRender(Sender: TObject;
Index: Integer; var ItemStyle: string); begin
if Index = 0 then
ItemStyle := ''RedFont'';
end;