Ahoj sousedi mam problem, componenta synedit pri hledani slova, vyhodi chybu ze neni prirazen zadny nastroj vyhledavani, original( No search engine has been assigned ) kde muze byt chyba?
Demo funguje ale mÓj program ne, a to jsem uz zkousel vsechny moznosti i opsal kod a ani toto nepomohlo.
compilovane demo funguje vyhledava, mÓj program totozny s demem nefunguje 8-O
procedure TEditorHTML.ReplaceDialog1Replace(Sender: TObject);
var
rOptions: TSynSearchOptions;
sSearch: string;
begin
sSearch := ReplaceDialog1.FindText;
if Length(sSearch) = 0 then begin
Beep;
lblSearchResult.Caption := 'Can''t search for empty text!';
lblSearchResult.Visible := TRUE;
end else begin
rOptions := [ssoReplace];
if frMatchCase in ReplaceDialog1.Options then
Include(rOptions, ssoMatchCase);
if frWholeWord in ReplaceDialog1.Options then
Include(rOptions, ssoWholeWord);
if frReplaceAll in ReplaceDialog1.Options then
Include(rOptions, ssoReplaceAll);
if SynEdit1.SearchReplace(sSearch, ReplaceDialog1.ReplaceText, rOptions) = 0
then begin
Beep;
lblSearchResult.Caption := chr(13)+'SearchText '''+chr(13)+ sSearch +chr(13)+ ''' not found!';
lblSearchResult.Visible := TRUE;
end else
lblSearchResult.Visible := FALSE;
end;
end;
System Win XP profesional, BDS 2006 Delphi Developer.