Board index » delphi » How to highlight the new row of items in listview

How to highlight the new row of items in listview

I am new to Delphi 3.0, and have a question about listview. I want to
highlight the new items that I just added in the listview, but I don't really
know how to do it. Can any Delphi experts help me with this? Thanks!

Felix Chan

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

 

Re:How to highlight the new row of items in listview


Quote
On Tue, 31 Mar 1998 08:47:36 -0600, flc...@datamaxx.com wrote:
>I am new to Delphi 3.0, and have a question about listview. I want to
>highlight the new items that I just added in the listview, but I don't really
>know how to do it. Can any Delphi experts help me with this? Thanks!

>Felix Chan

This works with delphi2
var
   NewItem : TListItem;

// first clear the old selections
          with ListView1 do
                 if Selected <> nil then Selected:= nil;

//repeat for each item
          NewItem:= ListView1.Items.Add;
          NewItem.selected:= True;
          NewItem.Focused:= True;

//finally
          ListView1.SetFocus;

Regards
Peter Geddes

Other Threads