Solved

Search/Replace component

Posted on 1998-04-11
3
212 Views
Last Modified: 2010-04-06
Where can I get a search/replace component for either a tmemo or a tedit window. It should work with Delphi 1.0 and 3.0. Alternatively, where can I get a unit or source code that can do search and replace. Something along the lines of the search/replace function that came with TEditWindow of (Borland Pascal 7.0) Object Windows.
0
Comment
Question by:swright243
3 Comments
 
LVL 4

Expert Comment

by:itamar
Comment Utility
   I think it's a good starting point. It's a descendant component from TRichEdit that have those     (and  others) functionalities. Give it a try, it's freeware:

   http://www.torry.webnorth.com/vcl/edits/ammemo1.zip

   If it helps, tell me so I can place this comment as an answer.
   IHTH,
   Itamar
0
 
LVL 3

Accepted Solution

by:
KE earned 50 total points
Comment Utility
Make your own !!!

Use the TMemo.Text property which gives you a String representation of the memo contents.

Make a function does smth. like this:

repeat
b := POS(FINDTHISTEXT, MyMemo.Text)
if b<>-1 then MyMemo.text := Copy(MyMemo.Text,1,b)+ReplaceWithThisText+Copy(Mymemo.Text,b+1,Length(MyMemo.Text);
until b=-1;

I do not guarantee that the above code works, it's just an example.
0
 

Author Comment

by:swright243
Comment Utility
A reasonable reply, but the Delphi help files have an even better answer. However both the help files and KE don't explain the most important thing about a search-how to "find next"

Itamar's comment on the other hand was exactly what I was looking for. I downloaded the component in his comment, popped it in and was done. I would give Itamar an A if I could figure out how.

For others reading this thread: contact ameeder@dds.nl for further information about this component.

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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