Solved

Search/Replace component

Posted on 1998-04-11
3
223 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
[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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month6 days, 21 hours left to enroll

623 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