Class TSearchAndReplace (unit SAR)

Inherits from

TComponent

Constructors


constructor Create(AnOwner:TComponent);



Functions

destructor Destroy;


procedure FindDialog;


procedure FindNext;

Shows the FindDialog and thus starts the find-session.

procedure Free;


procedure ReplaceDialog;

Allows the search to be continued after the FindDialog is closed - in Windows Notepad this would be the user pressing "F3"

procedure OnFindEvent(sender:TObject);

back up one char, to leave ptr on first non delim

procedure OnReplaceEvent(sender:TObject);


function SearchMemo(Memo: TCustomEdit;Find:TFindDialog):Boolean;


Properties

property Memo : TCustomEdit


property NotFound : string


Events

Variables

WordDelimiters : TDelimiter;


fFindDialog : TFindDialog;


fMemo : TCustomEdit;


fNotFound : string;


fReplaceDialog : TReplaceDialog;



Constructors


constructor Create(AnOwner:TComponent);


Functions


destructor Destroy;


procedure FindDialog;


procedure FindNext;

Shows the FindDialog and thus starts the find-session.


procedure Free;


procedure ReplaceDialog;

Allows the search to be continued after the FindDialog is closed - in Windows Notepad this would be the user pressing "F3"


procedure OnFindEvent(sender:TObject);

back up one char, to leave ptr on first non delim


procedure OnReplaceEvent(sender:TObject);


function SearchMemo(Memo: TCustomEdit;Find:TFindDialog):Boolean;


Properties


property Memo : TCustomEdit


property NotFound : string


Events


Variables


WordDelimiters : TDelimiter;


fFindDialog : TFindDialog;


fMemo : TCustomEdit;


fNotFound : string;


fReplaceDialog : TReplaceDialog;