Link to home
Start Free TrialLog in
Avatar of Applicationmaker
Applicationmaker

asked on

Synedit SearchEngine

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.
Avatar of TName
TName

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.
ASKER CERTIFIED SOLUTION
Avatar of TName
TName

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial