Solved

Search/Replace component

Posted on 1998-04-11
3
216 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
ID: 1361413
   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
ID: 1361414
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
ID: 1361415
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 110
Working with hours 3 57
Tvertscrollbox like a whatsapp layout 5 26
scroll down TListBox component in Delphi 1 9
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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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