?
Solved

Synedit SearchEngine

Posted on 2006-11-07
2
Medium Priority
?
1,194 Views
Last Modified: 2012-06-22
I cant get the Synedit searchengine started...

I invested this lines in the finddialog
onFind event:

PROCEDURE TEditorForm.FindDialog1Find(Sender: TObject);
  BEGIN
    IF DrillplanEditHasFocus THEN
    BEGIN
      DrillplanEdit.SearchEngine.Pattern:=FindDialog1.FindText;
      ShowMessage(IntToStr(DrillplanEdit.SearchEngine.FindAll(
        FindDialog1.FindText)));
      ShowMessage(IntToStr(DrillplanEdit.SearchEngine.Results[0]));
    END
    ELSE IF DiameterEditHasFocus THEN
    BEGIN
      DiameterEdit.SearchEngine.Pattern:=FindDialog1.FindText;
      DiameterEdit.SearchEngine.FindAll(FindDialog1.FindText);
    END;
  END;

I don`t know how to get the line number where the result was found.
and i don`t know how to know if the searchengine found something.
0
Comment
Question by:Applicationmaker
[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
  • 2
2 Comments
 
LVL 28

Expert Comment

by:TName
ID: 17894054
Hi,
maybe it's just a case of a misleadingly named boolean, but:
if  "IF DrillplanEditHasFocus"  means something like "if  DrillplanEdit.Focused", then I don't see how this code should execute. At this moment, the find dialog has the focus, so the DrillplanEdit/SynEdit cannot have it.
0
 
LVL 28

Accepted Solution

by:
TName earned 750 total points
ID: 17894351
Ok, forget that, I think I understand, it's a "frozen" DrillplanEdit.Focused, to know which edit had focus before calling the find dialog...
But then you should get the number of found strings when you call FindDialog1.execute.  
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

777 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