rzaripov1990 / ModernListView

[FireMonkey] Modern ListView - Colorizer, Vertical\Horizontal mode, Columns and other
120 stars 41 forks source link

how set the font, font size, fsbold,and font color of one of ListItem? #4

Closed jonahzheng closed 8 years ago

rzaripov1990 commented 8 years ago
var
  I: Integer;
begin
  for I := 0 to 9 do
  begin
    with ListView1.Items.Add do
      Text := 'Item ' + I.ToString;
  end;
end;
procedure TForm1.ListView1UpdateObjects(const Sender: TObject; const AItem: TListViewItem);
begin
  if AItem.Index = 4 then // only this Item
  begin
    AItem.Objects.TextObject.Font.Style := [TFontStyle.fsBold];
    AItem.Objects.TextObject.TextColor := TAlphaColorRec.Red;
  end;
end;
jonahzheng commented 7 years ago

@rzaripov1990 thank you! good job!