title: listview and custom font color per item with delphi
body: <p>I am trying to find a way so when I add an item to a <code>TListView</code> I can assign its own text color (by matching its name with a name I am entering into an edit box). I got it working, sort of, but the issue is when I add more then 2 items the font colors are changed for all of the items.</p>
  
  <p>Here is my test code:</p>
  
  <pre><code>procedure TMainForm.ListCustomDrawItem(Sender: TCustomListView;
    Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
  begin
    if Edit2.Text = Item.Caption then // match my name with item name
    begin
      Sender.Canvas.Font.Color := Font.Font.Color; // assign from font dialogue
      Sender.Canvas.Font.Style := Font.Font.Style; // assign from font dialogue
    end;
  end;
  </code></pre>
  
  <p>Does anyone have any ideas?</p>