Unit SAR

SAR.PAS 1.0 -------- -------- -------- -------- -------- -------- -------- -------- Contents: TSearchAndReplace - Simple-To-Use Text Search & Replace component which wraps the functionallity of TFindDialog and TReplaceDialog. -------- -------- -------- -------- -------- -------- -------- -------- Copyrights (C) 1997 ved T Skovmand Eriksen email: TSEriksen@cyberdude.com ALL RIGHTS RESERVED PARTS MAY BE COPYRIGHTED BY BORLAND INTL. -------- -------- -------- -------- -------- -------- -------- -------- This source is freeware and may be used as follows: * In development of in-house applications which will not be published. * In development of freeware applications PROVIDED that credit is given to me in the applications aboutbox or helpfile. * In development of shareware and commercial applications PROVIDED that I, Troels S Eriksen, recieve a free unlimited copy of all versions of said application AND that credits are given to me in the applications aboutbox or helpfile. * In printed or electronic form (fx. in a book) or in a source-library (fx. on CD) PROVIDED that I, Troels S Eriksen, recieve a royality-free unlimited copy of said book or library. * In any other way PROVIDED that I, Troels S Eriksen, give my explicit permission to the suggested use. By using this source you do acknowledge that the above restrictions apply to you and your use of this component and that you will confirm by them. -------- -------- -------- -------- -------- -------- -------- -------- Revision history: TSearchAndReplace Rev 01 - Control created. Rev 02 - SearchMemo() rewritten using ideas from a Borland DemoApp. Rev 03 - Full national chars support (runtime detect) added. -------- -------- -------- -------- -------- -------- -------- -------- Thanks to: * Warny B Saurbrey - Who patiently Alfa-tests a lot of my stuff -------- -------- -------- -------- -------- -------- -------- -------- TSearchAndReplace Properties: * Memo - The TMemo that should be searced. * NotFound - The message shown when no more matches is found. Should contain "%s" for inserting the find-text. TSearchAndReplace Methods: * FindDialog - Start a search session. * FindNext - Continues a previous search * ReplaceDialog - Start a search and replace session -------- -------- -------- -------- -------- -------- -------- -------- Known bugs and other issues: TSearchAndReplace * None. -------- -------- -------- -------- -------- -------- -------- -------- How to use: Drop a SearchAndReplace component on a form or datamodule. Link it to a Memo-field. Set the Memo's Hideselection property to false. Now just call the methods "FindDialog", "FindNext" and/or "ReplaceDialog" from your application's menu or toolbar. Nothing else is required. -------- -------- -------- -------- -------- -------- -------- --------

Classes

TSearchAndReplace -

Functions

Register - -- Register ----------------------------------------------------------------

Types

TDelimiter

Constants

Variables


Functions


procedure Register;

-- Register ----------------------------------------------------------------

Types


TDelimiter = Set of char

Constants


Variables