Solved

List View

Posted on 1997-04-30
1
182 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 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

18 Experts available now in Live!

Get 1:1 Help Now