Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

Version 1.4

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bob B.

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...

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.

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.

I'd also like to see the FindText method added to TMemo to avoid overhead when the RTF format isn't needed.

Bob B.

procedure TForm1.FindDialog1Find(Sender: TObject);
var
? s: string;
? FoundAt: LongInt;
? StartPos, ToEnd: Integer;
? mySearchTypes : TSearchTypes;
? myFindOptions : TFindOptions;
begin
? mySearchTypes := [];
? with RichEdit1 do
? begin
??? if frMatchCase in FindDialog1.Options then
?????? mySearchTypes := mySearchTypes + [stMatchCase];
??? if frWholeWord in FindDialog1.Options then
?????? mySearchTypes := mySearchTypes + [stWholeWord];
??? { Begin the search after the current selection, if there is one. }
??? { Otherwise, begin at the start of the text. }
??? if SelLength  0 then
????? StartPos := SelStart + SelLength
??? else
????? StartPos := 0;
??? { ToEnd is the length from StartPos through the end of the
????? text in the rich edit control. }
??? ToEnd := Length(Text) - StartPos;
??? s:=FindDialog1.FindText;?? // to avoid confusion with richedit1's findtext METHOD
??? FoundAt :=
????? richedit1.FindText(s, StartPos, ToEnd, mySearchTypes,not (frdown in finddialog1.Options));
??? if FoundAt  -1 then
??? begin
????? SetFocus;
????? SelStart := FoundAt;
????? SelLength := Length(FindDialog1.FindText);
??? end
??? else showmessage(s+'not found!');
? end;
end;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150414/7020f3c2/attachment.html>

Reply by email

Mattias Gaertner
to Bob B.
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...

Because of manpower our releases only include packages that we maintain. Hopefully some day we will have an easy plugin to easily find, download and install third party packages from sourceforge and similar repositories.

I'd also like to see the FindText method added to TMemo to avoid overhead when the RTF format isn't needed.

Feel free to create a patch.

Mattias

Reply by email

Dmitry Boyarintsev
to Bob B.: In the upcoming 1.4 release of Lazarus, please include lzRichEdit…
Bob B. wrote
Unlike RichMemo, with lzRichEdit you don't have to wrestle with svn, just download the zip file from

Well, not anymore. I've added a link to a downloadable .zip package for richmemo.
http://wiki.freepascal.org/RichMemo#Download
It's nightly built.

Btw, previously Alejandro Gonzalo has been using email address:

However, now it's Bob B. who is sending the email. Is it a pen name? I guess gmail classifies this kind of name change as spam.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150416/4a558e20/attachment-0001.html>

Reply by email