<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px">In the upcoming 1.4 release of Lazarus, please include lzRichEdit (http://wiki.lazarus.freepascal.org/lzRichEdit) in one of the two lists under Package->Install/Uninstall Packages...<br style="" class=""><br style="" class="">Laz currently does not come with a RichEdit component as Delphi does to create and display files in Rich Text Format (RTF). Unlike RichMemo, with lzRichEdit you don't have to wrestle with svn, just download the zip file from http://sourceforge.net/projects/lazarusfiles/files/lzRichEdit.zip/download and extract it into a directory off of lazarus/components, finally Package->Open Package File .lpk, Compile and Uses->Install. It'll be in the Common Controls tab of the pallete.<br style="" class=""><br style="" class="">Another need for a substitute for Delphi's RichEdit (like lzRichEdit) is that the FindText method (not property) doesn't exist in TMemo. It's needed by the FindDialog component to use the WholeWord and CaseSensitive options. Below I've shown an example of using FindDialog's OnFind event to do this with the lzRichEdit component.<br style="" class=""><br style="" class="">I'd also like to see the FindText method added to TMemo to avoid overhead when the RTF format isn't needed.<br style="" class=""><br style="" class="">Bob B.<br style="" class=""><br style="" class="">procedure TForm1.FindDialog1Find(Sender: TObject);<br style="" class="">var<br style="" class=""> s: string;<br style="" class=""> FoundAt: LongInt;<br style="" class=""> StartPos, ToEnd: Integer;<br style="" class=""> mySearchTypes : TSearchTypes;<br style="" class=""> myFindOptions : TFindOptions;<br style="" class="">begin<br style="" class=""> mySearchTypes := [];<br style="" class=""> with RichEdit1 do<br style="" class=""> begin<br style="" class=""> if frMatchCase in FindDialog1.Options then<br style="" class=""> mySearchTypes := mySearchTypes + [stMatchCase];<br style="" class=""> if frWholeWord in FindDialog1.Options then<br style="" class=""> mySearchTypes := mySearchTypes + [stWholeWord];<br style="" class=""> { Begin the search after the current selection, if there is one. }<br style="" class=""> { Otherwise, begin at the start of the text. }<br style="" class=""> if SelLength <> 0 then<br style="" class=""> StartPos := SelStart + SelLength<br style="" class=""> else<br style="" class=""> StartPos := 0;<br style="" class=""> { ToEnd is the length from StartPos through the end of the<br style="" class=""> text in the rich edit control. }<br style="" class=""> ToEnd := Length(Text) - StartPos;<br style="" class=""> s:=FindDialog1.FindText; // to avoid confusion with richedit1's findtext METHOD<br style="" class=""> FoundAt :=<br style="" class=""> richedit1.FindText(s, StartPos, ToEnd, mySearchTypes,not (frdown in finddialog1.Options));<br style="" class=""> if FoundAt <> -1 then<br style="" class=""> begin<br style="" class=""> SetFocus;<br style="" class=""> SelStart := FoundAt;<br style="" class=""> SelLength := Length(FindDialog1.FindText);<br style="" class=""> end<br style="" class=""> else showmessage(s+'not found!');<br style="" class=""> end;<br style="" class="">end;<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class=""><div id="yui_3_16_0_1_1427914765982_78915"><br></div></div></body></html>