Solved

Synedit SearchEngine

Posted on 2006-11-07
2
1,174 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 250 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

717 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