使用公共TOvcFileViewer.Search
方法。
从OvcViewr.pas:
function Search(const S : string; Options : TSearchOptionSet) : Boolean;
{-search for a string returning True if found}
override;
并来自 OvcData.pas:
type
{Search option flags for editor and viewer}
TSearchOptions = (
soFind, {find (this option is assumed) }
soBackward, {search backwards }
soMatchCase, {don't ignore case when searching }
soGlobal, {search globally }
soReplace, {find and replace (editor only)}
soReplaceAll, {find and replace all (editor only)}
soWholeWord, {match on whole word only (editor only)}
soSelText); {search in selected text (editor only)}
TSearchOptionSet = set of TSearchOptions;