Mail Archives: djgpp/1997/07/07/14:20:14
From: | Tim Lloyd <tlloyd AT zetnet DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | JPTUI Listbox Question
|
Date: | Wed, 2 Jul 1997 21:19:51 +0100
|
Message-ID: | <1997070221195166662@zetnet.co.uk>
|
NNTP-Posting-Host: | central.zetnet.co.uk
|
Lines: | 31
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
This is a simple question for those of you that use the JPTUI
interface libraries.
I have created my interface, no probs. However I need to read in a
file line by line and add each line to a JPTUI listbox.
Here is the code for adding items manually:
TListItem ListBoxItems[]= {
{"Item 1",LI_NOATTR},
{"Item 2",LI_NOATTR},
{"Item 3",LI_NOATTR},
{NULL,LI_NOATTR}
};
TListBox ListBox (&MainWindow,2,2,20,10,"List Bo~x",ListBoxItems);
I presume that I need to fill ListBoxItems[] with each line from my
file, however I think that may eat memory (as my text file is quite
large) so loading it directly into the listbox might be a better option.
However I'm only a beginner with C++, I'd really apreciate some help
with this one as I'm pretty clueless as to where to go from here.
I'm using JPTUI 3.xx.
Thanks in advance, Tim Lloyd.
- Raw text -