Forum > General

listview population

(1/1)

draggon:
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

balazsszekely:
First column is the caption:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---lst.Caption := tm_title(i); //add thislst.SubItems.Add(tmp_leader(i));lst.SubItems.Add(tmp_status(i));lst.SubItems.Add(tmp_cathegory(i));lst.SubItems.Add(tmp_sap(i));

draggon:
tanks, I have the Caption there, just removed the brackets but without success

balazsszekely:
You have a projectslist_main.Caption you need lst.Caption instead.

draggon:
oh watching but staying blind :-)
Thanks a lot

Navigation

[0] Message Index

Go to full version