Vcl.StdActns.TSearchReplace.ExecuteTarget
Delphi
procedure ExecuteTarget(Target: TObject); override;
C++
virtual void __fastcall ExecuteTarget(System::TObject* Target);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.StdActns.pas Vcl.StdActns.hpp |
Vcl.StdActns | TSearchReplace |
Description
Launches the associated dialog and assigns an event handler to replace found text.
Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).
Target is the currently active object when the action fires.
ExecuteTarget first launches the search-and-replace dialog specified by Dialog. This is a modeless dialog, so the result of the dialog's Execute method simply indicates whether the dialog successfully appeared or was brought into focus. This result is set as the value of the ExecuteResult property, and an OnAccept event occurs if the dialog was brought into focus, or an OnCancel event occurs if the dialog failed to appear.
Finally, ExecuteTarget sets the OnReplace event handler of the search-and-replace dialog to a private method that performs the replacement specified by the dialog.