Board index » delphi » How Add string to a SubItems ListView

How Add string to a SubItems ListView

I have put a ListView with 2 columns and the property to vsReport.
How can I add a value in the first column and a value in the second column
in the same line ?

Sam

 

Re:How Add string to a SubItems ListView


hi,

after you Add() your item to the ListView you can use SubItem.Add() for that
item to add each column

hans

Quote
Sam <skne...@biosys.net> wrote in message

news:8ngh9g$goh5@bornews.borland.com...
Quote
> I have put a ListView with 2 columns and the property to vsReport.
> How can I add a value in the first column and a value in the second column
> in the same line ?

> Sam

Re:How Add string to a SubItems ListView


Quote
>Sam wrote:

> I have put a ListView with 2 columns and the property to vsReport.
> How can I add a value in the first column and a value in the second > column in the same line ?

  with Listview.Items.Add do begin
    Caption := 'Item1';
    Subitems.Add('Subitem1')
  end;
________
Andreas
Delphi 5.01 Pro, NT4.0 Sp5
Direct replies mailto:p...@augsburg.netsurf.de

Other Threads