[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Again, very simple...

Posted on 1999-06-22
1
Medium Priority
?
128 Views
Last Modified: 2010-04-06
is there a way I can compare 2 listbox such that it will add all those items in the 1st listbox which is NOT in the 2nd listbox to a 3rd listbox?
0
Comment
Question by:jackjoker
1 Comment
 
LVL 2

Accepted Solution

by:
CalvinDay earned 20 total points
ID: 1384070
procedure TForm1.Button1Click(Sender: TObject);
var
  i:integer;
begin
  for i:=0 to listbox1.items.count-1 do
    if listbox2.items.indexOf(listbox1.items[i])=-1 then
      listbox3.items.add(listbox1.items[i]);
end;

0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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…
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…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

591 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