Contents - Index - Previous - Next


FindAndReplace method



Applies to
TProfGrid component

Declaration
function FindAndReplace(const FindText, ReplaceText: WideString; FindOptions: TFindOptions): Boolean;

Description

Performs a find-and-replace operation on the grid.

Tip:  TFindOptions is a standard VCL-defined type. You may refer to the VCL Reference for the list of possible values.


Example

The following example uses a TProfGrid and a TReplaceDialog placed on a form.

procedure TForm1.ToolButton1Click(Sender: TObject);
begin
  ReplaceDialog1.Execute;
end;

procedure TForm1.ReplaceDialog1Find(Sender: TObject);
begin
  ProfGrid1.Find(ReplaceDialog1.FindText, ReplaceDialog1.Options);
end;

procedure TForm1.ReplaceDialog1Replace(Sender: TObject);
begin
  ProfGrid1.FindAndReplace(ReplaceDialog1.FindText, ReplaceDialog1.ReplaceText, ReplaceDialog1.Options);
end;