Sign in Join
Wiki copytemporary

lzRichEdit

About

This component was created to solve or at least alleviate the lack of RichText component. Component runs on two platforms: Linux (GTK2) / Windows, and has different ways to work on both OS'es.

The two most important properties are Paragraph and SelAttributes, one takes care of the attributes of the paragraph and the other attributes of text.

Screenshot:

Author

Elson Junio (elsonjunio@yahoo.com.br).

Antônio Galvão.

Platforms

Linux (Gtk2) and Win32.

License

modified LGPL.

Download

The latest version is available here: http://sourceforge.net/projects/lazarusfiles/files/lzRichEdit.zip/download

SVN: https://lazarus-br.googlecode.com/svn/trunk/package/lzRichEdit

Installation

Methods

CopyToClipboard

Copies RTF text to clipboard.

CutToClipboard

Cuts RTF text to clipboard.

PasteFromClipboard

Pastes RTF text from clipboard.

FindText

Finds text in the control contents.

GetFirstVisibleLine

Gets the first visible line.

GetRTFSelection

Gets the selected RTF text to a provided stream.

PutRTFSelection

Puts the contents of a source RTF stream in the caret position.

GetWordAtPoint

Gets the word at the (x,y) position.

GetWordAtPos

Gets the word at the text position.

GetZoomState

Gets the zoom state of the RichEdit.

SetZoomState

Sets the zoom state of the RichEdit.

LoadFromFile

Loads a file.

SaveToFile

Saves a file.

Print

Prints the contents of the control.

Undo

Undo modifications.

Redo

Redo modifications.

ScrollLine

Scrolls for a given delta line position.

ScrollToCaret

Scrolls to the caret.

SelectAll

Selects all text.

Properties

Paragraph

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

Alignment: TRichEditAlignment

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

traLeft

Paragraph aligned to left.

traRight

Paragraph aligned to right.

traCenter

Paragraph centered.

traJustify

Paragraph justified.

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 is possible to change and get attribute values of the selected text.

Color: TColor

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

BackColor: TColor

Used to set / get the background 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).

CaretCoordinates

Column :Integer

Reads the caret column position.

Line :Integer

Reads the caret line position.

CaretPoint

X :Integer

Reads the X pixels position of the caret.

Y :Integer

Reads the Y pixels position of the caret.

ScrollPoint

X :Integer

Reads and writes the X scrolling position.

Y :Integer

Reads and writes the Y scrolling position.

DefaultExtension

string

Provides a way to set a file extension different than ".RTF" which can be correctly opened.

Graphic support

The images support is left up to 3 units:

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.


From the Free Pascal wiki, page "lzRichEdit", as it stood on 2021-08-27 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 4 people, 2014–2021

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
AntoniogalvaoCreated page
AntoniogalvaoAbout
Antoniogalvao
AntoniogalvaoDetails
AntoniogalvaoMore information
AntoniogalvaoMore information
AntoniogalvaoAbout
AntoniogalvaoParagraph
AntoniogalvaoSelAttributes
AntoniogalvaoMore information
AntoniogalvaoSupport for images
AntoniogalvaoLicense
AntoniogalvaoLicense
AntoniogalvaoLicense
AntoniogalvaoLicense
AntoniogalvaoDetails
AntoniogalvaoDetails
AntoniogalvaoDetails
AntoniogalvaoLicense
AntoniogalvaoDownload
AntoniogalvaoParagraph
AntoniogalvaoAlignment: TRichEditAlignment
AntoniogalvaoDetails
AntoniogalvaoMethods
AntoniogalvaoMethods
AntoniogalvaoName: TfontName
AntoniogalvaoStyle: TfontStyles
AntoniogalvaoDownload
AntoniogalvaoDownload
AntoniogalvaoSelAttributes
AntoniogalvaoSelAttributes
AntoniogalvaoSelAttributes
AntoniogalvaoMethods
AntoniogalvaoMethods
AntoniogalvaoSelAttributes
AntoniogalvaoMethods
Antoniogalvao
AntoniogalvaoAbout
AntoniogalvaoAbout
AntoniogalvaoAuthor
AntoniogalvaoPlatforms
AntoniogalvaoPlatforms
AntoniogalvaoMethods
AntoniogalvaoMethods
AntoniogalvaoCaretPoint
AntoniogalvaoScrollPoint
Antoniogalvao
Antoniogalvao
AntoniogalvaoDefaultExtension
AntoniogalvaoMethods
AntoniogalvaoFindText
AntoniogalvaoGetFirstVisibleLine
AntoniogalvaoGetRTFSelection
AntoniogalvaoPrint
AntoniogalvaoRedo
AntoniogalvaoPutRTFSelection
AntoniogalvaoPutRTFSelection
AntoniogalvaoGetRTFSelection
AntoniogalvaoDownload
AntoniogalvaoAuthor
AntoniogalvaoAuthor
AntoniogalvaoAuthor
AntoniogalvaoMore information
AntoniogalvaoDownload
FTurtle
AntoniogalvaoPlatforms
AlextpAbout
AlextpAbout
AlextpAbout
AlextpScreenshot: move shot upper
AlextpAbout: moved shot
AlextpSupport for images
AlextpComments from the users: Empty useless section
TrevFix heading levels (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.