Lazarus
Free Pascal => General => Topic started by: draggon on January 12, 2018, 05:00:09 pm
Title:
listview population
Post by:
draggon
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
Title:
Re: listview population
Post by:
balazsszekely
on
January 12, 2018, 05:09:55 pm
First column is the caption:
Code: Pascal
[Select]
[+]
[-]
lst
.
Caption
:
=
tm_title
(
i
)
;
//add this
lst
.
SubItems
.
Add
(
tmp_leader
(
i
)
)
;
lst
.
SubItems
.
Add
(
tmp_status
(
i
)
)
;
lst
.
SubItems
.
Add
(
tmp_cathegory
(
i
)
)
;
lst
.
SubItems
.
Add
(
tmp_sap
(
i
)
)
;
Title:
Re: listview population
Post by:
draggon
on
January 12, 2018, 05:42:27 pm
tanks, I have the Caption there, just removed the brackets but without success
Title:
Re: listview population
Post by:
balazsszekely
on
January 12, 2018, 05:44:28 pm
You have a projectslist_main.Caption you need lst.Caption instead.
Title:
Re: listview population
Post by:
draggon
on
January 12, 2018, 05:57:33 pm
oh watching but staying blind :-)
Thanks a lot
TinyPortal
© 2005-2018