From RAD Studio API Documentation
Jump to: navigation, search



TSearchAction = class(TCommonDialogAction)


class PASCALIMPLEMENTATION TSearchAction : public TCommonDialogAction


Type Visibility Source Unit Parent
class public
Vcl.StdActns Vcl.StdActns


TSearchAction is the base class for action objects that display a search or search and replace dialog.

TSearchAction implements the common behavior for actions that display a modeless dialog where the user can enter a search string for searching an edit control. Do not use TSearchAction directly in an application. Instead, use one of the TSearchAction descendants: TSearchFind or TSearchFindFirst for a simple locate dialog, TSearchReplace for a locate-and-replace dialog.

TSearchAction descendants are designed to work with an edit control (TCustomEdit descendant) as a target. They automatically disable themselves if the active control in a form is not an edit control.

Unlike other dialog actions, search actions represent a modeless dialog. As a result, the OnAccept event occurs not when the user exits the dialog, but when the dialog first appears or comes into focus. When the user directs the dialog to search for or replace a string, the search action automatically performs that search, selecting or replacing text in the target edit control.

See Also