Contents - Index - Previous - Next


Find method



Applies to
TProfGrid component

Declaration
function Find(const FindText: WideString; FindOptions: TFindOptions): Boolean;

Description

Searches the grid for the specified substring and moves the focus to the appropriate cell on success.

Returns True on success. Returns False if the specified substring was not found in 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 TFindDialog placed on a form.

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

{ TFindDialog.OnFind event handler: }
procedure TForm1.FindDialog1Find(Sender: TObject);
begin
  ProfGrid1.Find(FindDialog1.FindText, FindDialog1.Options);
end;