Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Copying Lines From a File and Other

Posted on 1998-07-05
1
Medium Priority
?
266 Views
Last Modified: 2013-11-22
I have a big file (It has about 1290 lines). I want to copy just some lines of the file in a RichEdit. How to do it so that it is fast? And how to do to seek quickly for a word in the file?
0
Comment
Question by:billbass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
Jacco earned 100 total points
ID: 1357121
To search a RichEdit see:

Q.10060068

If you want to search the RTF or TXT file you can use the following method:

1) Open the file
2) Read the entire file into a string usiong BlockRead
3) Use the POS function to find your text in this string

This is a very fast thing. If you want a case-insensitive search you can:

1) uppercase the searchstring
2) uppercase the entire text string
3) then use the POS function

To copy some lines of an RTF into a RicxhEdit can be a rather difficult task, because you have to determine the end of lines in the RTF with all the formatting commands inside it. I have the RTF specification but I think it is rather difficult to implement it correctly.

What you can do is loading the entire file in to a non-visible richedit. Copy the lines you want in your visible richedit to the clipboard and past them into the visible RichEdit.

Regards Jacco

good luck
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 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