How to add subitens of a Listview to a Memo?

Asked

Viewed 591 times

4

I have a Listview with 5 fields. I need to take the Listview number 5 field and add it to a Memo.

I tried it this way:

Memo1.Lines.Add(LV1.Selected.SubItems[5]);

Unfortunately it didn’t work. It doesn’t make any mistakes but it also doesn’t do anything. What I might be doing wrong?

1 answer

2


Take the list of all the items in your Listview, then take the fifth item in the list, and finally take your text. Example:

Memo1.Lines.Add(LV1.Items.Item[4].Caption); //se quiser pegar o quinto ponha índice 4
  • 1

    Settled, thank you friend!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.