- 1 About
- 2 Author
- 3 Platforms
- 4 License
- 5 Download
- 6 Installation
- 7 Details
- 7.1 Methods
- 7.1.1 CopyToClipboard
- 7.1.2 CutToClipboard
- 7.1.3 PasteFromClipboard
- 7.1.4 FindText
- 7.1.5 GetFirstVisibleLine
- 7.1.6 GetRTFSelection
- 7.1.7 PutRTFSelection
- 7.1.8 GetWordAtPoint
- 7.1.9 GetWordAtPos
- 7.1.10 GetZoomState
- 7.1.11 SetZoomState
- 7.1.12 LoadFromFile
- 7.1.13 SaveToFile
- 7.1.14 Print
- 7.1.15 Undo
- 7.1.16 Redo
- 7.1.17 ScrollLine
- 7.1.18 ScrollToCaret
- 7.1.19 SelectAll
- 7.2 Properties
- 7.2.1 Paragraph
- 7.2.2 SelAttributes
- 7.2.3 CaretCoordinates
- 7.2.4 CaretPoint
- 7.2.5 ScrollPoint
- 7.2.6 DefaultExtension
- 7.3 Graphic support
- 7.1 Methods
- 8 More information
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.
- Control in Windows is provided by OS API. Win version supports all features that Win32 API has.
- Linux file reading is made by FPC TRTFParser class, with some changes to support images, this class is slower on complex files. Linux version supports only text formatting.
The two most important properties are Paragraph and SelAttributes, one takes care of the attributes of the paragraph and the other attributes of text.
Elson Junio (firstname.lastname@example.org).
Linux (Gtk2) and Win32.
The latest version is available here: http://sourceforge.net/projects/lazarusfiles/files/lzRichEdit.zip/download
- Download the package
- Open the package, and install it, rebuilding the IDE
- TlzRichEdit is added to 'Common Controls' component page.
Copies RTF text to clipboard.
Cuts RTF text to clipboard.
Pastes RTF text from clipboard.
Finds text in the control contents.
Gets the first visible line.
Gets the selected RTF text to a provided stream.
Puts the contents of a source RTF stream in the caret position.
Gets the word at the (x,y) position.
Gets the word at the text position.
Gets the zoom state of the RichEdit.
Sets the zoom state of the RichEdit.
Loads a file.
Saves a file.
Prints the contents of the control.
Scrolls for a given delta line position.
Scrolls to the caret.
Selects all text.
It is possible to change the current paragraph attributes (it is guided by SelStart) property.
Sets / gets the alignment of the paragraph or selected text.
Paragraph aligned to left.
Paragraph aligned to right.
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.
Sets / gets the paragraph indentation left.
Sets / gets the distance from the text in the paragraph right corner of the control.
Inserts \ checks in paragraph marker, only one paragraph at a time.
It is possible to change and get attribute values of the selected text.
Used to set / get the color of the selected text.
Used to set / get the background color of the selected text.
Used to set / get the font of the selected text.
Used to set / get the font size of the selected text.
Used to set / recer the font style of the selected text (Linux / Windows).
Reads the caret column position.
Reads the caret line position.
Reads the X pixels position of the caret.
Reads the Y pixels position of the caret.
Reads and writes the X scrolling position.
Reads and writes the Y scrolling position.
Provides a way to set a file extension different than ".RTF" which can be correctly opened.
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.
For more information, see the Example Project or contact the author.