| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Delphi Editor |
To: Frank Malcolm
Hi Frank,
can I load *part* of a file into a Memo object?
I could BlockRead the file into an indexed Pchar string, and then
move the pointer and make that the Memo text
... but Delphi *wants* you to use its objects so I use a TStringList
and LoadFromFile to put the whole file into TstrLst. Very nice. It's
1500 lines all up and 40K. How do I put lines 400-1100 into the Memo?
If I go:
for n := 400 to 1100 do Memo.Lines.add(TstrLst[n]);
it works okay but it's as slow as a wet weekend. If I create another
TrstringList and write to that first, then use Memo.Addstrings() at
least I stop Memo rewriting the screen but it's still slow. There
*must* be a way to point Memo as the already-existing TstrLst memory.
But I'm buggered if I can find it!
As it stands, I'll have to go back to agricultural Pascal and forget
about reading lines.
Regards,
Bob
___ Blue Wave/QWK v2.12
@EOT:
---
* Origin: Precision Nonsense, Sydney (3:711/934.12)SEEN-BY: 711/934 712/610 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.