A modernized, cross-platform, open-source refactoring of the classic freeware TRichView 0.5.x component originally created by Sergey Tkachenko (1997-2001).
This project serves as a clean, lightweight, dependency-free foundation for rich text rendering, tables, printing, and extensions (such as TMarkdownView) across VCL and FireMonkey (FMX).
- Cross-Platform Shared Engine (
src/RichViewCoreEngine.pas): ConsolidatedRichView.pas,RVStyle.pas,RVScroll.pas,PtblRV.pas, andRV_Save.incinto a clean platform-independent core (TRVLayoutEngine,TRVRenderTarget,TRVTableItem,TRVStyle), shared by both VCL (src/RichViewCore.pas) and FireMonkey (src/RichViewCoreFMX.pas). - FireMonkey Support (
TRichViewFMX,TRVStyleFMX,TRVPrintFMX): Full FMX implementation usingTTextLayout,TScrollBox,IFMXClipboardService, UTF-8 HTML/Text export, and cross-platform A4 page preview (TRVPrintFMX). - Unified Rendering & Printing Pipeline: Eliminated duplicate drawing logic between screen rendering and printing/preview. Both screen controls and page previews use the exact same layout and rendering engine.
- Built-in Table Support (
TRVTableItem): Native table rendering (AddTable) with column alignment (taLeftJustify,taCenter,taRightJustify), multi-span cell styling, automatic column shrinking with word-wrap, selection/clipboard export, and HTML<TABLE>generation. - Unicode & 64-bit Ready: Removed legacy ANSI 1000-byte stack buffers, Win9x 16-bit coordinate hacks, and deprecated APIs. Compiles cleanly with 0 errors, 0 warnings, and 0 hints from Delphi 7 up to Delphi 13 (Win32 & Win64) using sgmVersions.
- Print Preview: Added
TRVPrint.MakeMetafilePreview(VCL) andTRVPrintFMX.MakePreview(FMX) for crisp, scalable A4 page previews at any zoom level (Fit Page,Page Width,100%–200%). - Unit Tested: Covered by 20 DUnit tests for VCL (
test/RichViewTests.dpr) and 11 DUnitX tests for FMX (tests.fmx/RichViewFMXTests.dpr).
- TMarkdownView - Native VCL Markdown viewer component built on top of
TRichView. - MarkdownView TC Plugin - Fast native Lister plugin (
wlx/wlx64) for Total Commander (F3/Ctrl+Q). - sgmVersions - Cross-version compiler directives include file (
Delphi 2-Delphi 13).
├── bin/ # Compiled executables and packages (Win32 / x64)
├── dcu/ # Compiled unit files
├── demo/ # VCL dynamic runtime demo application (no IDE installation required)
├── demo.fmx/ # FireMonkey dynamic runtime demo application
├── docs/ # Documentation assets and screenshots
├── pkg/ # VCL IDE packages (RichView_D7.dpk, RichView_D13.dpk)
├── pkg.fmx/ # FireMonkey IDE package (RichViewFMX_D13.dpk)
├── res/ # Component palette icons (.res) and icon generator utility
├── src/ # Core engine (RichViewCoreEngine.pas), VCL & FMX components and registration units
├── test/ # VCL DUnit test suite (RichViewTests.dpr - 20 tests)
├── tests.fmx/ # FMX DUnitX test suite (RichViewFMXTests.dpr - 11 tests)
├── LICENSE # MIT License
├── README.md # English documentation
└── README.ru.md # Russian documentation
Add src/ to your project search path (it already includes sgmVersions.inc) and use RichViewCore (for VCL) or RichViewCoreFMX (for FireMonkey):
// VCL example (see also demo.fmx/uMainFMX.pas for TRichViewFMX)
uses
RichViewCore;
var
RVStyle: TRVStyle;
RichView: TRichView;
Table: TRVTableItem;
Row: TRVTableRow;
begin
RVStyle := TRVStyle.Create(Self);
RichView := TRichView.Create(Self);
RichView.Parent := Self;
RichView.Align := alClient;
RichView.Style := RVStyle;
RichView.AddCenterLine('Hello, TRichView!', rvsHeading);
RichView.AddFromNewLine('Normal text and ', rvsNormal);
RichView.Add('clickable link', rvsJump1);
Table := RichView.AddTable;
Row := Table.AddRow;
Row.AddCell(taLeftJustify, True).AddText('Column 1', rvsSubheading);
Row.AddCell(taRightJustify, True).AddText('Column 2', rvsSubheading);
RichView.Format;
end;- Open the package(s) matching your Delphi version and framework:
- VCL (Delphi 7):
pkg/RichView_D7.dpk - VCL (Delphi 13):
pkg/RichView_D13.dpk - FireMonkey (Delphi 13):
pkg.fmx/RichViewFMX_D13.dpk
- VCL (Delphi 7):
- Click Compile, then Install.
TRichView,TRVStyle, andTRVPrintwill appear on the RichView palette tab;TRichViewFMX,TRVStyleFMX, andTRVPrintFMXwill appear on the RichView FMX tab (both packages can coexist in the same IDE).
- VCL (DUnit): Open
test/RichViewTests.dprin Delphi 7 or Delphi 13 (Win32 / Win64), build, and runRichViewTests.exe(20 test cases). - FireMonkey (DUnitX): Open
tests.fmx/RichViewFMXTests.dpr(or thepgMainFMXproject group) in Delphi 13, build, and runRichViewFMXTests.exe(11 test cases).
- Original TRichView 0.5.x Freeware Concept & Base Code: Copyright © 1997-2001 Sergey Tkachenko (TRichView).
- Modernization, Refactoring & Extensions: Copyright © Maksim Grusha / StudioGM Software (studiogm.us), licensed under the MIT License (see
LICENSE).
