?
Solved

Help with ListView items

Posted on 2004-04-02
3
Medium Priority
?
258 Views
Last Modified: 2010-04-05
Hi there,

I would first like to say that i'm giving you all the points that i'm got left, so i understand if i don't get a response.

I have the following code in a ListView:

var
I, tmp: Integer;

for I:= 0 to ListView1.Items.Count - 1 do
begin
 tmp:=  StrToInt(ListView1.Items[I].Caption);
 case tmp of
  0:begin //do something here end;
  1:begin //do something here end;
  2:begin //do something here end;
 end;
 end;

What i need to know it how do copy each field the it reads while looping to a Tmemo or TEdit ect...

So, if the first line contains whenever, the i need to copy the items or subitems somewhere else.

In other word to be able to copy them somewhere else.

I really need this, but i understand that i haven't got much points left, so i understand if i don't get help.
0
Comment
Question by:sfern
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
wframsay earned 172 total points
ID: 10740771
You wish to copy what from the ListView?  The Caption for each item?

TMemo.Add( ListView1.Items[ i ].Caption );
0
 
LVL 1

Expert Comment

by:wframsay
ID: 10740780
Make that Memo1.Lines.Add( ListView1.Items[ i ].Caption );

or.. for your TEdit:

Edit1.Caption :=  ListView1.Items[ i ].Caption;
0
 

Author Comment

by:sfern
ID: 10740990
Thanks for your help.

And sorry for not having more points left.

I really appriciate it.

Thanks again

SFern
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question