Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Populating an unbound tlistview


This question is answered.


Permlink Replies: 2 - Last Post: Jun 28, 2016 12:41 AM Last Post By: Ken Randall
al nickels

Posts: 173
Registered: 7/16/09
Populating an unbound tlistview  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2016 11:50 AM
How can you populate an unbound tlistview with headers and detail items? I want to populate theses types of records at runtime and not design time. The data will be populated with text that I gather from user input or an XML string that I will parse manually.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Populating an unbound tlistview
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2016 12:43 PM   in response to: al nickels in response to: al nickels
Am 27.06.2016 um 20:50 schrieb al nickels:
How can you populate an unbound tlistview with headers and detail items? I want to populate theses types of records at runtime and not design time. The data will be populated with text that I gather from user input or an XML string that I will parse manually.

Hello,

you can add items at runtime:

var
  Item: TListViewItem;
begin
  Item := MyListview.Add;
  Item.Text := 'My variable text';
end;


Don't ask me about the headers though, but it should work wuite similiar.

Greetings

Markus
Ken Randall

Posts: 130
Registered: 11/12/99
Re: Populating an unbound tlistview
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2016 12:41 AM   in response to: Markus Humm in response to: Markus Humm
Try:

Item.Purpose:=TListItemPurpose.Header;

Markus Humm wrote:

Am 27.06.2016 um 20:50 schrieb al nickels:
How can you populate an unbound tlistview with headers and detail
items? I want to populate theses types of records at runtime and
not design time. The data will be populated with text that I
gather from user input or an XML string that I will parse manually.

Hello,

you can add items at runtime:

var
  Item: TListViewItem;
begin
  Item := MyListview.Add;
  Item.Text := 'My variable text';
end;


Don't ask me about the headers though, but it should work wuite
similiar.

Greetings

Markus
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02