Solved

Help with ListView items

Posted on 2004-04-02
3
253 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 43 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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