Difference between revisions of "lzRichEdit"

From Free Pascal wiki
Jump to navigationJump to search
Line 59: Line 59:
  
 
= Details =
 
= Details =
 +
 +
[[Image: lzRichEdit.png]]
 +
 
== Paragraph ==
 
== Paragraph ==
 
It is possible to change the current paragraph attributes (it is guided by
 
It is possible to change the current paragraph attributes (it is guided by

Revision as of 23:16, 11 November 2014

Template:Translate

About

This component was created to try to solve or at least alleviate the lack a Rich Text Editor component, this component runs on two platforms Linux (GTK2) / Windows, and has different ways to work on both OSs. The rich text control in Windows is provided by a library (API) and so is much faster than Linux. Linux file reading rich text is made by the FPC RTFPars TRTFParser ie the class, with some changes to support images, this class is just slower to treat rich complex text files, the Linux version only supports formatting text, paragraph and pictures and everything Windows supports what Ole and the APIWindows can offer. The two most important properties are the lzRichEdit Paragraph and SelAttributes, one takes care of the attributes of the paragraph and the other attributes of text.

Author

Elson Junio (elsonjunio@yahoo.com.br)

License

lzRichEdit

Copyright (C) 2010 Elson Junio elsonjunio@yahoo.com.br

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version with the following modification:

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules,and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Download

The latest trunk is available here: https://code.google.com/p/lazarus-br/downloads/detail?name=lzRichEdit.zip&can=2&q=label%3AOpSys-Windows

Installation

  • Download the package
  • Open the package, and install it, rebuilding the IDE
  • TlzRichEdit is added to 'Common Controls' component page.

Details

lzRichEdit.png

Paragraph

It is possible to change the current paragraph attributes (it is guided by SelStart) property.

Alignment: TAlignment

Sets / gets the alignment of the paragraph or selected text.

FirstIndent: Longint

Sets / gets the indentation of the first line of a paragraph, FirstIndent works differently on Linux and Windows. Under Windows it has a relationship LeftIndent proportional to its value and shouldnt be negative if you want your effect is the recoil of the line, Otherwise the line is advanced. Linux does not the relationship between LeftIndent and FirstIndent and its value must be positive for Causing the retreat of line.

LeftIndent: Longint

Sets / gets the paragraph indentation left.

RightIndent: Longint

Sets / gets the distance from the text in the paragraph right corner of the control.

Numbering: TnumberingStyle

Inserts \ checks in paragraph marker, only one paragraph at a time.

SelAttributes

It's posível change and get attribute values of the selected text.

Color: TColor

Used to set / get the color of the selected text.

Name: TfontName

Used to set / get the font of the selected text.

Size: Integer

Used to set / get the font size of the selected text.

Style: TfontStyles

Used to set / recer the font style of the selected text (Linux / Windows).

Support for images:

The image support is left up to 3 units, RichOleBox, RichOle, GTKTextImage, These units are in the sample folder and can be placed along with the source code of your program.

More information

For more information, see the Example Project or contact the author.