replace TrvActionReplace

Properties   Methods   Events

<< Click to display table of contents >>

replace TrvActionReplace

Properties   Methods   Events

TrvActionReplace is the action for "Edit | Replace" command

Unit RichViewActions;

Syntax

TrvActionReplace = class(TrvAction)

hmtoggle_arrow1Hierarchy

Description

This action displays a TReplaceDialog for searching and replacing a substring in the TCustomRichViewEdit component. If at the moment of execution a single line of text is selected, this text is copied to the replace dialog (as a text to find). If at the moment of execution a find dialog is shown, it is closed.

The search starts from the caret position to the end or to the beginning of the document. If the text is found, it is replaced. If not found, the action's behavior depends on GetControlPanel.SearchScope property:

rvssFromCursor, the search stops;

rvssAskUser, the action asks user whether to continue from the beginning/end;

rvssGlobal, the search continues from the beginning/end.

If nothing found, a message is displayed.

In Delphi 2009+, or if TNT Controls are used, the action searches for Unicode string and replaces it with Unicode string. Otherwise, it works with ANSI strings.

See also:

TrvActionFindNext

TrvActionFind