Search thru a memo in Delphi?
问题 Can anybody give me some simple code that would give me the ability to search a simple string in a memo and have it highlighted in the memo after being found? 回答1: This search allows for document wrap, case (in)sensitive search and searching from cursor position. type TSearchOption = (soIgnoreCase, soFromStart, soWrap); TSearchOptions = set of TSearchOption; function SearchText( Control: TCustomEdit; Search: string; SearchOptions: TSearchOptions): Boolean; var Text: string; Index: Integer;