Avatar of rincewind666
rincewind666
 asked on

Show numbers in column as numbers in row

I have something like the following in a listbox:

39003,11104,41725,13592,40151,98743,81428,29743,69623
5,3,7,3,5,7,7,2,5
2661,9433,3701,4899,5647,4700,5409,2843,2021

Using the above figures, I need the following added to another listbox:

39003,5,2661
11104,3,9433
41725,7,3701
13592,3,4899
40151,5,5647
98743,7,4700
81428,7,5409
29743,2,2843
69623,5,2021

Please note that a number is taken from each column of the first set of numbers and added to the bottom set in a row, separated by commas.

I am using Delphi 6.  Your help is greatly appreciated.  Thanks.
Delphi

Avatar of undefined
Last Comment
rincewind666

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ferruccio Accalai

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Thommy

Try my attached code...
ListBoxConvert.dpr
Unit1.pas
Unit1.dfm
Ferruccio Accalai

Thommy, you never frees the dynamic TStringlist s1, and then if a day someone decides to use a number of columns different than 3 it shouldn't work
rincewind666

ASKER
Many thanks for your help.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23