Solved

List View

Posted on 1997-04-30
1
194 Views
Last Modified: 2010-04-04
Dear Experts,I wish to fill a list view with Items and SubItems from an INI file as follows:



Heading1    | Heading2
-------------------------------------
A           | Data for A
B           | Data for B
C           | Data for C
D           | Data for D
...


so the INI file would look something like:

[Heading1]
Value=A,B,C,D ...

[Heading2]
Data="Data for A","Data for B","Data for C","Data for D" ...


I've tried various methods including CommaText and LoadFromFile but can't seem to get it 100%
succesful, I had a wierd thing with CommaText, the first Item wasn't read properly, it completey
ignored the first set of quotes!

Any help would be appreciated, as I don't want to hard code the data into the program.

Thanks in advance,
Antony
0
Comment
Question by:antony burden
1 Comment
 

Accepted Solution

by:
lkovac earned 100 total points
ID: 1335797
You can do it this way:

[Values] {use any name of the section here you wish}
A=Data for A
B=Data for B
C=Data for C
D=Data for D

etc...

This section would be dedicated only for data in the list.

However, if this is Delphi 2.0 (or even 3.0) and 32 bit world, use rather Registry, with about the similar context: one folder (key) in the registry with string items inside (I expect the Data are strings; but here you can use even DWORDs and similar types).
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now