Solved

Synedit SearchEngine

Posted on 2006-11-07
2
1,126 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
  • 2
2 Comments
 
LVL 28

Expert Comment

by:TName
Comment Utility
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 250 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

14 Experts available now in Live!

Get 1:1 Help Now