Recent

Author Topic: listview population  (Read 2261 times)

draggon

  • New Member
  • *
  • Posts: 41
listview population
« on: January 12, 2018, 05:00:09 pm »
When populating listvew with data from array the first column remains blank, no data displayed. I think I am using statdard code:


for i:= 2 to last_row do
     begin

         lst:= projectslist_main.Items.Add;
Showmessage(tmp_title(i)); // displays correct expected value
         projectslist_main.Caption:= (tmp_title(i));
         lst.SubItems.Add(tmp_leader(i));
         lst.SubItems.Add(tmp_status(i));
         lst.SubItems.Add(tmp_cathegory(i));
         lst.SubItems.Add(tmp_sap(i));
     End;

Thanks
« Last Edit: January 12, 2018, 05:06:34 pm by draggon »

balazsszekely

  • Guest
Re: listview population
« Reply #1 on: January 12, 2018, 05:09:55 pm »
First column is the caption:
Code: Pascal  [Select][+][-]
  1. lst.Caption := tm_title(i); //add this
  2. lst.SubItems.Add(tmp_leader(i));
  3. lst.SubItems.Add(tmp_status(i));
  4. lst.SubItems.Add(tmp_cathegory(i));
  5. lst.SubItems.Add(tmp_sap(i));

draggon

  • New Member
  • *
  • Posts: 41
Re: listview population
« Reply #2 on: January 12, 2018, 05:42:27 pm »
tanks, I have the Caption there, just removed the brackets but without success

balazsszekely

  • Guest
Re: listview population
« Reply #3 on: January 12, 2018, 05:44:28 pm »
You have a projectslist_main.Caption you need lst.Caption instead.

draggon

  • New Member
  • *
  • Posts: 41
Re: listview population
« Reply #4 on: January 12, 2018, 05:57:33 pm »
oh watching but staying blind :-)
Thanks a lot

 

TinyPortal © 2005-2018