Vcl.StdActns.TSearchAction.Search
Delphi
procedure Search(Sender: TObject); virtual;
C++
virtual void __fastcall Search(System::TObject* Sender);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.StdActns.pas Vcl.StdActns.hpp |
Vcl.StdActns | TSearchAction |
Description
Selects the next occurrence of the search string in the target edit control.
Most applications have no need to call the Search method: the TSearchAction constructor automatically assigns Search as the OnFind event handler of its associated dialog. The dialog's OnFind event occurs when the user directs the dialog to find a specified string.
Search searches the target edit control for the string that is the FindText property of the search dialog, using the options specified by the dialog's Options property. If it finds the specified string, it selects it in the edit control. Otherwise, it displays a message to the user indicating that the string was not found.
Note: If the search action is an instance of TSearchFind, Search looks for the first occurrence of FindText after the current selection in the edit control. If the search action is an instance of TSearchFindFirst, Search looks for the first occurrence of FindText, regardless of the current selection.