How do I get the Find and Find/Replace to appear when user presses Alt-F (Find) and
Alt-? (Find/Replace)
Regards,
John
How do I get the Find and Find/Replace to appear when user presses Alt-F (Find) and
Alt-? (Find/Replace)
Regards,
John
Start a TFindDialog from the OnKeyDown event and use it as for example:
procedure TAdvRichEditorEditingToolBar.Find(Sender: TObject);
var
fd: TFindDialog;
begin
fd := TFindDialog.Create(Self);
fd.Options := fd.Options - [frWholeWord] + [frHideWholeWord, frHideUpDown];
fd.OnFind := FindHandler;
fd.Execute;
end;
procedure TAdvRichEditorEditingToolBar.FindHandler(Sender: TObject);
begin
if Assigned(RichEditor) then
RichEditor.Find((Sender as TFindDialog).FindText, frMatchCase in (Sender as TFindDialog).Options);
end;